Skip to main content
GreenGuy
Senior III
October 23, 2017
Solved

Why is there no output from TIM9 CH2 on PE6

  • October 23, 2017
  • 6 replies
  • 1324 views
Posted on October 24, 2017 at 01:21

I am using the STM32F429ZI.  I have setup four timers to slave from TIM3.  The timers are TM1, TM2, TM4, TM9.  All four are setup the same as PWM generators in One Pulse Mode and I have checked multiple times to make certain they are being triggered from the correct ITRx.  TM1,2,4 output on CH1 and TM9 on CH2.  TM1,2,4 create pulses on their output pins that match the expected delay and width, but TM9 does not output anything and is always low.  The configuration was setup in MXCube using the latest repository 1.16.0. 

I double checked the PE6 (pin5 in my case - 144 QFP) by setting it to a GPIO.  I am able to toggle the pin and the output behaves correctly. 

All else is working as expected with Ethernet, Uarts, and other GPIO. 

MXCube does not complain that pin resources are in violation. 

Either I am missing something subtle or basic, or that is a bug.

    This topic has been closed for replies.
    Best answer by waclawek.jan
    Posted on October 24, 2017 at 09:27

    Set TIM9 CH2 up as a PWM Generator with internal clock checked (as before) with slave mode and trigger source disabled.

    Check if TIM9's clock enabled in RCC. Note that TIM9 is on APB2.

    Read out and check or post TIM9 registers' content. Check in debugger (or craft code in main()) if TIM9_CNT is counting up. Check if ARR is higher than CCR2. Check if proper mode is set to channel 2 in CCMR1 and channel 2 is enabled in CCER. Try CH1 on TIM9.

    Also check in GPIO registers for given pin if it is set to AF in MODER and to proper AF number in AFRL/AFRH, and it's not OC.

    JW

    6 replies

    waclawek.jan
    Super User
    October 23, 2017
    Posted on October 24, 2017 at 01:31

    Run a plain unconditional continuous PWM on that TIM9 CH2.  If that works and you setup still does not, then read out and check or post TIM9 registers.

    JW

    GreenGuy
    GreenGuyAuthor
    Senior III
    October 24, 2017
    Posted on October 24, 2017 at 03:10

    Set TIM9 CH2 up as a PWM Generator with internal clock checked (as before) with slave mode and trigger source disabled.  Used the same hal call to start TIM9 as TIM3.

    Output on 3, no output on 9.

    S.Ma
    Principal
    October 24, 2017
    Posted on October 24, 2017 at 04:19

    Better confirm by reading the reference manual for TIM9 behaviour...