DMA full and half complete callbacks work!

This commit is contained in:
2025-12-18 19:46:12 +03:00
parent 08b903134f
commit 55a6a91260
10 changed files with 2653 additions and 2529 deletions

View File

@ -96,7 +96,8 @@ int main(void)
MX_ADC1_Init();
MX_USB_DEVICE_Init();
/* USER CODE BEGIN 2 */
//HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC1_buff_circular, ADC_BUFF_SIZE);
HAL_GPIO_WritePin(LED_BLUE_GPIO_Port, LED_BLUE_Pin, GPIO_PIN_SET);
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC1_buff_circular, ADC_BUFF_SIZE);
/* USER CODE END 2 */
/* Infinite loop */

View File

@ -228,14 +228,14 @@ void OTG_FS_IRQHandler(void)
}
/* USER CODE BEGIN 1 */
/*
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
HAL_GPIO_WritePin(LED_BLUE_GPIO_Port, LED_BLUE_Pin, GPIO_PIN_SET);
// This function is called when the first half of the ADC buffer is filled
// You can process the first half of ADC1_buff_circular here
}
*/
void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc)