2017-10-30 03:09 AM
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.2017-11-01 04:05 PM
It works using another pin (pa0) and timer (tim5) and I don't know why! However thank you for all the answers.
2017-11-01 04:40 PM
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.