2024-09-26 11:36 AM
So my stm32h7 works fine using regular interrupts. But when doing it via DMA,
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *adc)
is never called.
I enabled ADC global interrupt and BDMA channel0 global interrupt.
circular buffer,
continuous conversion mode enabled, conversion data management mode is at DMA circular mode as well.
My other DMA for i2s, SAI and UART work perfectly fine?
I call dma using :
HAL_ADC_Start_DMA(&hadc3, (uint32_t*) Battery_read, sizeof(Battery_read));
2024-09-26 01:34 PM
You didn't mention that you enabled DMA Continuous Requests?
2024-09-30 07:34 AM
Hello @TMich.1
You can use the ADC examples provided in the STM32CubeH7 repository on GitHub , Specifically, you can refer to the DMA example : https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H7A3ZI-Q/Examples/ADC/ADC_DMA_Transfer
This example show how to configure and use the ADC to convert an external analog input and get
the result using a DMA transfer through the HAL API. it can help you to correctly configure the ADC with DMA for your application .
BR