fix iwdg example and add code to disable iwdg in halt#10
fix iwdg example and add code to disable iwdg in halt#10PocketPi wants to merge 1 commit intogicking:masterfrom
Conversation
|
Thanks for pointing this out to me! Now I'm trying to understand and test your changes. Which specific STM8 variant are you using? |
|
Intermediate update: I have played around with a STM8S Discovery board to check your observation and proposed changes. Here is my current status:
|
|
Update:
|
fix iwdg example and add code to disable iwdg in halt
When using the example to enable and use the iwdg i found that when i had my cpu enter halt the watchdog kept running and timed out even though i had enabled that the cpu should stop in halt mode.
I found looking at some legacy code that setting KR to 0xAA and not 0xCC fixed the problem.
Maybe the 0xAA is a copy paste error?
I have also added a function to disable watchdog in halt in the option bytes