cancel
Showing results for 
Search instead for 
Did you mean: 

SPC57 SWT Issue

david tomsa
Associate III
Posted on November 17, 2017 at 09:29

Hi guys,

i want to use the swt.

My Init Code: 

SWT.SR.R = 0xC520;

SWT.SR.R = 0xD928;

while (SWT.CR.B.SLK == 0x1);

SWT.TO.R = 0x0F42400;

SWT.CR.R = 0xFF00014F;

My Service Sequence:

SWT.SR.B.WSC = 0xA602;

SWT.SR.B.WSC = 0xB480;

For Testing, I service the Watchdog an stop servicing after 10 second. My Problem is, that the WD don't reset the System.

When I use the Debugger, i can see that the SWT_CO stands still.

Can anyone help me?

4 REPLIES 4
Erwan YVIN
ST Employee
Posted on November 17, 2017 at 11:23

Hello David ,

in the register SWT_CR,

you have disabled the watchdog (Cf Screenshot)

SWT.SR.R = 0xC520;�?

0690X0000060PFRQA2.png

Best regards

Erwan

175924CGIL2
Posted on November 20, 2017 at 15:45

Sorry David , it is my mistake 

You have well enabled the WD (confusion between SR and CR)

SWT.CR.R = 0xFF00014F;

you have kept FRZ bit to 1

it means SWT counter is stopped in debug mode.

could you disable it ?

      Best regards

              Erwan

Posted on November 21, 2017 at 07:51

Hi Erwan,

Sorry David , it is my mistake 

no problem, it's an confusing Controller.

When i set the frz bit to one, my controller become a reset in Debug Mode. 

And i found out, why i could't see the SWT Counter (SWT_CO). It's only visible, when the WD is disabled.

The only Problem i have is, that i get just one Reset. (with or without debugger). Do you have an idea why that could be? 

Best regards

David