Forum : ST7/STM8
Post Information | Post |
---|---|
March 17, 2011 - 11:36am
|
Hello all, I'm trying to pulse out a PWM with the output compare function. TIM3 CC1 work fine (checked with the scope) but when trying to do the same with TIM2 CC3 nothing happend ! But this two channels are sharing the same pin ! TIM2 CC2 work fine, so the timer is running, what's wrong ? Here is my code : /* Reset the Output Compare Bits & Set the Output Compare Mode */ /* Set the Pulse value */ Of course i tryed with cosmic compiler and all other compiler, Ride7 and STVD, without success... The datasheet said that I can do, but it doesn't ! Alternative code under Ride7 : Don't work !!! Please help !!! |
I found by myself !
You need to set the option byte OPT2 = 0x02 (NOPT2 = 0xFD) to enable TIM2 CC3 and disable TIM3 CC1, following is the asm file to add in your project :