cancel
Showing results for 
Search instead for 
Did you mean: 

Input capture missing edges when running multiple timers

ronnietango
Associate

I have a NUCLEO-G0B1RE board generating 4 PWM signals at 10kHz using TIM1, which is working fine.

For my application I also need to be able to read 4-5 PWM signals in - so for now I am trying to read these same signals generated on TIM1 to test the input capture. I am using TIM2 and TIM3 in input capture mode with DMA for this purpose. TIM2 and TIM3 are run from the APB clock at 16MHz, with a prescaler value of 16-1.

Looking at the "Live Expressions" in the debugger, the results are *mostly* correct, but it appears that occasionally one of the timers will miss a transition, leading to the measured period being twice what it should be. 

Am I asking too much of the STM32G0B1RET6 part here, or (more likely) have I done something wrong/overlooked something which would prevent this?

I have attached my main.c file below - please let me know if I've missed any important information to help with identifying the issue and I'll update it.

Thanks!

 

 

0 REPLIES 0