Skip to main content
jjyeh1976
Associate III
October 2, 2009
Question

Control the initial level while using the Timer output compare mode

  • October 2, 2009
  • 2 replies
  • 1001 views
Posted on October 02, 2009 at 09:13

Control the initial level while using the Timer output compare mode

    This topic has been closed for replies.

    2 replies

    mozra27
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:04

    Hi,

    You can configure the mode PWM mode1 or PWM mode2 in the TIMx_CCMR1 register and then select the polarity (CC1P bit) in the TIMx_CCER1 Capture/compare enable register 1.

    regards

    mozra

    jjyeh1976
    jjyeh1976Author
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 15:04

    Hi,

    I'm using the Timer 3 in output compare mode with toggles, each time the

    interrupt occurred, I have to change the next match value (TIMx->CCRn).

    My question is: is it possible to set the initial state in a known level?

    I'vd try to use GPIOx->ODR, but this seems not work.