cancel
Showing results for 
Search instead for 
Did you mean: 

STM8 Firmware Library (TIM1) bug

rgresume
Associate
Posted on February 04, 2014 at 21:01

I think there's a bug in TIM1_OC4Init function of stm8s_tim1.c

    /* Set the Output Idle state */

    if (TIM1_OCIdleState != TIM1_OCIDLESTATE_RESET)

    {

        TIM1->OISR |= (uint8_t)(~TIM1_CCER2_CC4P);

    }

    else

    {

        TIM1->OISR &= (uint8_t)(~TIM1_OISR_OIS4);

    }

I believe ~TIM1_CCER2_CC4P should be replaced with TIM1_OISR_OIS4
0 REPLIES 0