AnsweredAssumed Answered

STM8 Firmware Library (TIM1) bug

Question asked by RobG on Feb 4, 2014
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

Outcomes