cancel
Showing results for 
Search instead for 
Did you mean: 

ADC with DMA's interrupt not working on STM32F303RBT

atavo.11
Associate

Hi all;

I am using SM32f303RBT6 with Cube version 6.21 and IAR version 9.30.

I used 2 ADC unit with DMA and used one timer(TI M 4) as trigger.

there are 3 other timer in code that was used as two pulsers and to make sure the number of the pulses are 10.( the line "__HAL_TIM_GET_COUNTER(&htim8) == 11 *NUM_PUlSE"

in code)

The problem seems to be in [switch/case number 1] and Interrupt of ADC_dma . I used debug and saw that while(1) loop runs one time and the second time the ADC_dma interrupt doen't work. (adc_L_flag become 0 in interrupt first time but in second time adc_L_flag remains 1 and the while loop stays in case 2)

Can anyone help me with it?

To explain my the code a little:

MT_EN is power enable.

Then I start timers and work with their duty cycle in while loop.

Then in while loop, there is a switch case:

case 0 is for one pulser. (Threre will be one pulser with same code after the adc but it's not in this main.c yet.)

case 1 is eableing adc with dma.

case 2 is to check if adc_L_flag has changed from interrupt or not.

0 REPLIES 0