MPC5643L goes into DRUN mode after wakeup from Halt

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5643L goes into DRUN mode after wakeup from Halt

Jump to solution
236 Views
andyfoxx
Contributor II

Hi i'm running into an issue with the MPC5643L where the MCU switches to DRUN mode after wakeup from Halt0. The MCU was originally in RUN0 mode before switching to Halt0 for low power mode. The wakeup is triggered by a timer interrupt.

 

Prior to Halt0 request

ME_GS: 0x441f0074

 

After a timer interrupt wakes up the MCU:

ME_GS: 0x341f0074

ME_DMTS:0x40000000

 

Any ideas?

 

Thanks.

Labels (1)
0 Kudos
1 Solution
60 Views
andyfoxx
Contributor II

OK I found an issue in my sleep macro. Effectively, the mcu was being placed in DRUN and not HALT0.

Thanks.

View solution in original post

0 Kudos
4 Replies
61 Views
andyfoxx
Contributor II

OK I found an issue in my sleep macro. Effectively, the mcu was being placed in DRUN and not HALT0.

Thanks.

View solution in original post

0 Kudos
60 Views
andyfoxx
Contributor II

Peter,

Thanks for your response. I am aware that there's no natural transition in the reference manual from HALT0 to DRUN (which is why I started this post). My first suspicion was that a reset was occurring and I proved that this wasn't the case with breakpoints before the main loop.

Thanks.

0 Kudos
60 Views
andyfoxx
Contributor II

Some additional info: 

RGM.FES and RGM.DES indicates no events (all zero) after wakeup from HALT0 (in DRUN). 

0 Kudos
60 Views
petervlna
NXP Employee
NXP Employee

Hi,

You are getting reset on wakeup from halt0.

As you can see from reference manual it is not possible to make mode transition from halt0 to DRUN.

pastedImage_1.png

Please clear the RGM registers FES and DES before entering HALT0 state and set breakpoint on startup of your code, to prevent further execution after reset.You can also place a dummy loop there and stop SWT to prevent SWT reset.

Then check the RGM FES/DES register content or connect with debugger, attach a check FES/DES.

You will see the reset reason.

If the reset reason is FCCU then check FCCU CFS and NCFS registers for fault source.

Peter

0 Kudos