I have a program that uses Processor Expert and it appears as if the watchdog is not functioning. I have added a WatchDog component to my project, but have disabled auto initialization. I have also gone into the 'Cpu:SKEAZN...' processor component and set 'Watchdog disable' to 'no'. My assumption is that this should leave the watchdog registers as their default values (which should be enabled, and set to some reset time), since the Watchdog component never initializes itself. However, when I run the program, it is not resetting on watchdog timeout. Clearly I am not understanding something here; what am I missing?
-Josiah
Solved! Go to Solution.
Hi Josiah,
The watchdog may be disabled in __init_hardware(). Please check the code:
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Josiah,
The watchdog may be disabled in __init_hardware(). Please check the code:
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
It looks like that was indeed the problem. I thought I took care of that when I changed the Cpu component settings to 'Watchdog disable: no', but it looks like adding a WatchDog components also inserts that same code to disable the watchdog in __init_hardware().
My plan now is the modify the watchdog registers within the __init_hardware() function instead of using a watchdog component, to make sure that the watchdog is never disabled after startup. I put my watchdog initialization code in the "User code before PE initialization" property of the Cpu component. Any reason why this might be a bad way to do this?
-Josiah