MPC5748G Watchdog

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

MPC5748G Watchdog

1,618 Views
tony_huang
Contributor III

Hi, I am using MPC5748G watchdog module.And how to config system clock:   MC_ME.GS.B.S_SIRCON=1?

Here is my code,and the project  can not work OK.

void  SWT_enable(void)

{

      SWT_0.SR.R=0xc520;

      SWT_0.SR.R=0xd928;

      SWT_0.TO.R=2560000;   //10s

      SWT_0.CR.R=0x8000010B;

}

void  SWT_service(void)

{

      SWT_0.SR.B.WSC=0xA602;

      SWT_0.SR.B.WSC=0xB480;

}

QQ图片20170514150723.jpg

QQ图片20170514150731.jpg

2 Replies

825 Views
Ada_Lovelace
Contributor IV

Hello, has your clock been configured successfully? Can you guide me?

0 Kudos
Reply

1,151 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Please see reference examples for clock configuration we have posted on community:

Example MPC5748G PinToggleStationery GHS614 

https://community.nxp.com/docs/DOC-104751 

Follow the clock configuration in those examples and I am sure you won't have any issues.

SWT init and SWT service looks good.

Peter

PS: don't forget that our examples use 40MHz XTAL.