cancel
Showing results for 
Search instead for 
Did you mean: 

Pwm input mode F401RE

Marco Perciavalle
Associate II
Posted on October 30, 2017 at 11:09

Hi, i have a problem about pwm input mode for f401re board. Forse my purpose, I use cubemx and set Tim 9 slave controller in reset mode, TI1FP1 ad trigger source, Channel 1 in input capture direct mode and Channel 2 in input capture indirect mode, as It is written in ref manual. Then I thick 'internal clock', choose an ARR value and prescaler values compatible with my test signal to mesure and generate the code.

On IAR, I only enable timer input capture mode using 'HAL_TIM_IC_Start(&htim9,TIM_CHANNEL_ALL' function. What i see is that the counter Tim 9 works, CNT is continuosly updated, but Tim9_ccr1 and tim9_ccr2 always remain at 0 values despite the test pwm signal has the right frequency according to counter's range. It seems the board doesn t recognize signal's edges. On reference manual is written that ccrx values should not reset despite of the reset mode. So, is there anything else to do?

Thanks for all the answer. Best regards.

#stm32-f4 #pwm #input-capture-mode

Note: this post was migrated and contained many threaded conversations, some content may be missing.
11 REPLIES 11
Posted on November 01, 2017 at 23:05

It works using another pin (pa0) and timer (tim5) and I don't know why! However thank you for all the answers. 

Posted on November 01, 2017 at 23:40

PA2 is used for the VCP/USART on the NUCLEO-F401RE, if that's what you're using, the post lacks specificity on the board.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..