cancel
Showing results for 
Search instead for 
Did you mean: 

Configurate the complementary output of STM8S

leozhang
Associate
Posted on May 15, 2009 at 09:38

Configurate the complementary output of STM8S

3 REPLIES 3
leozhang
Associate
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!

bassinux
Associate II
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

amin2
Associate II
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 ]