MPC5748G watchdog reset problem

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

MPC5748G watchdog reset problem

1,096 Views
Ada_Lovelace
Contributor IV
Hi, everyone
my watchdog reset problem. I'm using boot loader. Why can my watchdog reset only a few times and then can't reset again. Sometimes the program jumps to startup.S "bss_Init_loop:"
Ada_Lovelace_1-1650941514229.png

 

 
The program will run and fly. This is my code. Can you give me some guidance?
 
This is my system clock configuration
 
Ada_Lovelace_0-1650942575491.png

 This is my watchdog initialization configuration:

Ada_Lovelace_1-1650942608719.png

 

 This is my dog feeding program:

 

Ada_Lovelace_2-1650941701268.png

Is there a problem with my timeout? How much timeout setting is appropriate?

0 Kudos
3 Replies

1,040 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Looks like you are new to embedded programming.

The SWT is on this device enabled by default ( when it comes from factory) and the default SWT timeout is 20ms.

Your SW is handling SWT configuration.

It looks like your startup is disabling SWT to prevent reset after 20ms. This is usually sooner then your code is able to reach main where users service watchdog.

That is OK.

In you application you have to enable SWT, I expect you are doing it here:

petervlna_0-1651051511645.png

That is OK, but have in mind debuggers by default disable SWTs. So either configure your debug tool to enable SWT, or run tests without debugger. (you should see periodic resests).

Last thing you have to care about is reset escalation counter. I hope you are handling this in your code, otherwise you will run into reset escalation when only Power on Reset can recover the device.

For more details refer to reference manual SWT chapter 52.5 Functional description.

Best regards,

Peter

 

0 Kudos

1,057 Views
Ada_Lovelace
Contributor IV

hi,

Is this right?

Ada_Lovelace_1-1651025816811.png

 

If this operation cannot be debugged

 

Ada_Lovelace_0-1651025789639.png

What should I do now? Please guide me,thank you

 

0 Kudos

1,063 Views
Ada_Lovelace
Contributor IV

Hello,

thank you for your reply. I tried to update the last three lines in 《turn off swts》. Running my program will still jump to 《sram_loop:》, is there any other solution?

Ada_Lovelace_1-1651022618898.png

 

Ada_Lovelace_0-1651022590721.png

 

0 Kudos