I am programming an S9KEAZ128 microcontroller, and I am running into a watchdog issue that I do not understand.
At some point, I need to disable the watchdog to perform an operation, and then enable it again afterwards. The watchdog is correctly disabled. However, when I try to enable it again, the watchdog registers are correctly reconfigured as expected, but the watchdog timer is stuck at 0.
Here is the snippet of code that Disables the watchdog:
I couldn't find anything on the reference manual that would explain this behavior. I wonder if this is a problem with the silicon, and if so, if there is a workaround. I would appreciate it if anyone could shed some light on this.