Watchdog not enabled on startup

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Watchdog not enabled on startup

Jump to solution
1,111 Views
justusandjustic
Contributor III

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

Labels (1)
0 Kudos
1 Solution
607 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Josiah,

The watchdog may be disabled in __init_hardware(). Please check the code:

disable WDOG.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
608 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Josiah,

The watchdog may be disabled in __init_hardware(). Please check the code:

disable WDOG.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
607 Views
justusandjustic
Contributor III

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?

watchdog.png

-Josiah

0 Kudos