SWT_B

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
807 Views
mehmetkaradag
Contributor III

Dear all,

I am using MPC5777C.

I have configured SWT_B same way as SWT_A but it is not starting to count. So I have seen it is configured correctly and its register values are correct but not starting.

hope someone can help me,

thank you.

0 Kudos
Reply
1 Solution
793 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Hard to say, it is pretty simple task.

void SWT_B_Init(void)
{
/* unlock SWT_A */
SWT_B.SR.R = 0xC520;
SWT_B.SR.R = 0xD928;

SWT_B.MCR.R = 0xFF00004A; // Configure SWT_B, SWT_B dissabled
SWT_B.TO.R = 0x0005FCD0; // Configure timeout for SWT
SWT_B.MCR.R = 0xFF000049; // Configure SWT_B, SWT_B enabled
}//SWT_B_Init

If you share with me your failing code, I can check it here on my evaluation board. There must be some very basic mistake.

One think which comes to my mind, is that you are looking at SWT in debugger. By default debugger disable watchdogs, so one can debug.

Otherwise the SWT timeout would make debugging impossible.

 

Best regards,

Peter

View solution in original post

2 Replies
794 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Hard to say, it is pretty simple task.

void SWT_B_Init(void)
{
/* unlock SWT_A */
SWT_B.SR.R = 0xC520;
SWT_B.SR.R = 0xD928;

SWT_B.MCR.R = 0xFF00004A; // Configure SWT_B, SWT_B dissabled
SWT_B.TO.R = 0x0005FCD0; // Configure timeout for SWT
SWT_B.MCR.R = 0xFF000049; // Configure SWT_B, SWT_B enabled
}//SWT_B_Init

If you share with me your failing code, I can check it here on my evaluation board. There must be some very basic mistake.

One think which comes to my mind, is that you are looking at SWT in debugger. By default debugger disable watchdogs, so one can debug.

Otherwise the SWT timeout would make debugging impossible.

 

Best regards,

Peter

789 Views
mehmetkaradag
Contributor III

I solved problem. Thank a lot for your helps. 

0 Kudos
Reply