SWT_B

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
2,127 次查看
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 项奖励
回复
1 解答
2,113 次查看
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

在原帖中查看解决方案

2 回复数
2,114 次查看
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

2,109 次查看
mehmetkaradag
Contributor III

I solved problem. Thank a lot for your helps. 

0 项奖励
回复