ADC with DMA cracks the system
Hey, I just have a simple code, relevant parts are attached below
uint32_t dataADC = 0 ; // globally defined
HAL_ADC_Start_DMA(&hadc1, &dataADC, 1); // after cubemx automatic inits
and that is all; in the while(1) loop, there is only a delay and toggle command. But the processor got stuck in this way. When I comment out the HAL_ADC_Start_DMA(&hadc1, &dataADC, 1); part, it works as normally an LED blink.
But if I let the command HAL_ADC_Start_DMA(&hadc1, &dataADC, 1); active, then I can see the adc reading(potentiometer) changes in the live debug but nothing inside while(1) loop happens.
What could be the problem ?
Thanks.
Edit : I have tried a simpler example, and I am sure that the problem results from DMA.
