HAL Timer PWM Instance and Init parameters error with ADC1
- July 17, 2020
- 8 replies
- 9530 views
Hello,
I am working on STM32F413VGT with STM32CubeIde.
I am using timer 3 channels 1 and 2 to generate 2 PWM signals to control a motor. This part works perfectly.
I am also using ADC1 in DMA mode to get 7 ADC measurements. This function also works perfectly.
I can change the PWM value with UART command or GPIO. But, when ADC measurement and PWM signals are both in my software the PWM signals freeze after some minutes and I can't change it. Instance and Init value of this are changed when I check on STM32CubeIde. (timer3_ok and timer3_ko)
Do you know why I have this problem on timer3 when ADC is used ?
I don't have this problem with an other timer or when the ADC is not present. I have just this error with the timer3.
I tried to generate a PWM signal with TIM1 CH4 and TIM2 CH2 and no problem...
I also tried to use ADC1 without DMA but I also have the same problem.
Parameters with timer3 OK:

Parameters with timer3 KO:

Thank you,
Tom
