ADC conversion on STM32F070F6 Direct ADC conversion work but Interrupt and DMA doesn't.
Hi I am trying to implement a simple ADC conversion, 1 channel, discontinuous, using STM32F070F6. The code is generated by CubeMX using STM32Cube FW 1.11.3.
Direct Conversion
The direct conversion works.
HAL_ADC_Start(&hadc);
HAL_ADC_PollForConversion(&hadc, HAL_MAX_DELAY);
m_ui32ADC_raw = HAL_ADC_GetValue(&hadc);Interrupt (HAL_ADC_Start_IT)
I call
HAL_ADC_Start_IT(&hadc);but HAL_ADC_ConvCpltCallback() never fires. I noticed that the ADC1_IRQHandler defined in the startup file is not implemeted in the code. I try to add this function and call HAL_ADC_ConvCpltCallback inside but the ADC1_IRQHandler is not called.
DMA conversion
With DMA I get an hardFault from HAL_ADC_Start_DMA, precisely in the assignment
hadc->DMA_Handle->XferCpltCallback = ADC_DMAConvCplt;If I will be able to implement the interrupt conversion I will be happy. Thank you for the support.
