Skip to main content
leozhang
Associate
May 15, 2009
Question

Configurate the complementary output of STM8S

  • May 15, 2009
  • 3 replies
  • 1552 views
Posted on May 15, 2009 at 09:38

Configurate the complementary output of STM8S

    This topic has been closed for replies.

    3 replies

    bassinux
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:01

    Hi LeozHang,

    NCCx pin work in the same way as CCx, you must just enable the output in the corresponding Register TIM1_CCER1 for (CC1,NCC1,CC2 and NCC3) or TIM1_CCER2 for (CC3, NCC3 and CC4).

    You must also set MOE bit in TIM1_BKR register.

    Best Regards

    Bassinux

    leozhang
    leozhangAuthor
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 15:01

    Dear all,

    I am debugging a PWM complementary output of STM8S on a motor application, but it can't work well. I don't know what problems in the configuration of TIM1, it can output the PWM signal on CCx pin but no complementary signal on NCCx pin.

    Who can give me some advice or a example of TIM1 complementary function? Thanks very much!

    amin2
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:01

    Hi leozhang,

    There is an example called ''TIM1_ComplementarySignals_DeadTime_Break_Lock'' in the STM8S Firmware package which reachs your needs ;)

    here is the link to the Firmware package :

    http://www.st.com/products/support/micro/files/stm8sfwlib.zip

    Enjoy ;)

    Cheers,

    Amin

    [ This message was edited by: amin.agina on 15-05-2009 13:10 ]