STM8S003 BUG IN TIMER(not confirmed)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-12-21 9:18 AM
Posted on December 21, 2014 at 18:18
set up the prescaler and period, and let it run.
then at certain point, I want to set the counter to some specific value. however, it seems that setting counter using TIM1_SetCounter(), can actually clear the prescaler setting(TIM1->PSCR = 0). I wasn't sure whether this is a silicon bug or not. would anyone make a test about this problem with his STM8S? and solution: set the desired prescaler immediately after SetCounter(), like my example below.void
setcntr()
{
TIM1_SetCounter(1);
TIM1->PSCRH = 0;
TIM1->PSCRL = 15;
TIM1->EGR =TIM1_PSCRELOADMODE_IMMEDIATE;
}
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
