Forum : ST7/STM8
Original Post
| Post Information | Post |
|---|---|
|
October 22, 2010 - 10:49am
|
Hi, How can I reset the STM8S processor using software? Thanks&Regards |
Forum : ST7/STM8
| Post Information | Post |
|---|---|
|
October 22, 2010 - 10:49am
|
Hi, How can I reset the STM8S processor using software? Thanks&Regards |
Hi Volkan,
A trick is to use the IDWG: Activate it and loop forever. Once the timeout expires, a reset is generated.
A drawback of this method is that it is relatively slow.
Here is the code:
// Reset the CPU: Enable the watchdog and wait until it expires IWDG->KR = IWDG_KEY_ENABLE; while ( 1 ); // Wait until reset occurs from IWDGRegards,
Bruno