Skip to main content
Visitor II
March 4, 2019
Question

WWDG bug in STM8S103F3?

  • March 4, 2019
  • 0 replies
  • 532 views

Hello,

On STM8S103F3 MCU I, might have found a bug in the WWDT.

Found nothing related in errata. My environment: IAR, HSI 16Mhz

Problem: kicking WWDG too early doesn't trigger instant reset.

void main(void)
{
 WWDG->CR = WWDG_CR_WDGA | 0x7F;
 WWDG->WR = 0x50;
 
 while(1)
 {
 // kicking WWDG too early doesn't trigger instant reset, only if I execute this line ~25times
 // which is useless in real life
 WWDG->CR = WWDG_CR_WDGA | (0x50+1);
 }
}

    This topic has been closed for replies.