2014-02-04 12:01 PM
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