Watchdog IRQ issue in Mac57d5MB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Watchdog IRQ issue in Mac57d5MB

跳至解决方案
3,786 次查看
prashantsathe
Contributor III

Hi,

 

I am trying to get an Irq from watch dog timeout but unable to do so. Could be please point out my error.

 

Below is the code snippet.

 

void watchdogtest()

{

  /*Enable watch-dog*/

    enable_irq (INT_SWT_0 - MAC57D54H_FIRST_USER_IRQ);

    route_interrupt (INT_SWT_0 - MAC57D54H_FIRST_USER_IRQ, 0x03);

 

  SWT_0.SR.R = 0x0000c520;

  SWT_0.SR.R = 0x0000d928;

  SWT_0.CR.B.WEN = 0;

  SWT_0.TO.R = 0x500;

  SWT_0.CR.B.ITR = 1;

  SWT_0.CR.B.FRZ = 0;

 

 

  SWT_0.CR.B.WEN = 1;

  SWT_0.CR.B.SLK = 1;

 

  uPrintf("In a While Loop...\n");

  while(1); //

}

 

vector 122 is corresponds to SWT0

#define    VECTOR_122      default_isr_test  /*default_isr_test is dummy function to test an IRQ*/

clock SIRC is enabled .

 

and below is the register value corresponding to SWT0

 

156244_156244.pngpastedImage_1.png

 

 

Thanks in advance,

 

-Prashant

标签 (1)
1 解答
3,278 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Not sure what's wrong. I can see that also on computer connected to public net even if I'm not logged in. Is this link working on your side?

https://community.nxp.com/servlet/JiveServlet/download/816656-1-390566/halo-standby.zip

I will try to attach it again to this post with extension renamed from zip to aaa. Maybe it's caused by your firewall or something like that.

在原帖中查看解决方案

10 回复数
3,277 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there's simple example in this thread:

SIRC clock

It could solve your problem.

Regards,

Lukas

0 项奖励
回复
3,277 次查看
prashantsathe
Contributor III

Access denied ..

Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here.

0 项奖励
回复
3,277 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Sorry, I didn't realize it is restricted item. Example is attached...

Lukas

0 项奖励
回复
3,277 次查看
prashantsathe
Contributor III

There is no attachment please check once again. And is it related to SIRC clk enable ? If yes then i have already enabled the clk as mentioned in previous mail . please check

pastedImage_0.png

0 项奖励
回复
3,277 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Can you already see the attachment in my previous post? It seems that it is not visible immediately...

The example is related also to watchdog.

Lukas

0 项奖励
回复
3,277 次查看
prashantsathe
Contributor III

No, it is not still visible. can we have other way please. waiting for your quick reply ..

0 项奖励
回复
3,279 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Not sure what's wrong. I can see that also on computer connected to public net even if I'm not logged in. Is this link working on your side?

https://community.nxp.com/servlet/JiveServlet/download/816656-1-390566/halo-standby.zip

I will try to attach it again to this post with extension renamed from zip to aaa. Maybe it's caused by your firewall or something like that.

3,278 次查看
prashantsathe
Contributor III

Yes, Problem is solved now.

lukaszadrapa​ Thanks for your support.

Cheers,

-Prashant

0 项奖励
回复
3,278 次查看
prashantsathe
Contributor III
0 项奖励
回复
3,278 次查看
prashantsathe
Contributor III

BTW, if you are talking about enabling SIRC clk then we have already have below code at start up which is used to enable the SIRC.

    /* Turn on FXOSC, SIRC and SXOSC - can integrate this into enable PLL step - leaving separate for now during testing */

    MC_ME.DRUN_MC.R = 0x00130030;

    MC_ME.MCTL.R    = 0x30005AF0;

    MC_ME.MCTL.R    = 0x3000A50F;

let me know if it is different ..

-Prashant

0 项奖励
回复