MPC5744 can't enter to STOP0 and HALT0 mode

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

MPC5744 can't enter to STOP0 and HALT0 mode

Jump to solution
1,273 Views
郭开辉
Contributor I

        First, the official routine code can not enter the STOP0 mode, and then we initialize the system for the RUN0 mode, refer to the data manual write mode conversion there is no way to enter, the mode conversion code is as follows:

       

    asm(" wrteei 0");   //close all interrupt as reference manual said

    MC_ME.ME.R = 0x00000080;   //enable STOP0 mode
    MC_ME.RUN3_MC.R = 0x001F0031; /* mvron=1 FLAON=RUN XOSCON=1 FIRCON=1 SYSCLK=FIRC */
    MC_ME.MCTL.R = 0xA0005AF0;      /* Enter STOP mode and key */
    MC_ME.MCTL.R = 0xA000A50F;      /* Enter STOP mode and inverted key */
    while (MC_ME.GS.B.S_MTRANS) {}  /* Wait for STOP mode transition to complete */

         

  How can enter the STOP and HALT mode? hoping to help me solve, thank you!

1 Solution
902 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I can see you are entering STOP mode from DRUN which is not possible.

You have to enter it from RUN0...3 mode.

See attached example code which I just tested and device is entering STOP0 mode with any issues.

Peter

View solution in original post

3 Replies
903 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I can see you are entering STOP mode from DRUN which is not possible.

You have to enter it from RUN0...3 mode.

See attached example code which I just tested and device is entering STOP0 mode with any issues.

Peter

902 Views
郭开辉
Contributor I

my compiler environment is S32 Designer Studio,and Debugger is PE, this code also can't enter into STOP0.I have the official example code ,it have a note as follow:

Detailed Description:
NOTE: This demo currently does not work when running from P&E or GHS debuggers. It will get stuck trying to enter STOP0 mode! If you are using one of these debuggers, flash your program, then disconnect and reset the board for it to run freely. Program runs fine on Lauterbach, however.

so ,Do you have any solution expect for changing compiler environment and debugger?

0 Kudos
902 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

No. This is not microcontroller issue.

If you buy cheap debugger which do not support low power debug then you can't do it.

In standalone your code will enter STOP0 with no issues. However as soon as you connect PE you will be in the issue as NOTE describe.

Peter