Problem in Wake-up In MM912

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

Problem in Wake-up In MM912

1,016 Views
alirezabazm
Contributor I
unfortunately I'm stack on Stop mode and the Wake up in MM912G634
for going in stop it is enough
asm ANDCC #0x6F;
asm NOP;
asm (STOP);

According to datasheet:
"
For wake-up from STOP the basic flow is as follows:
1. Analog die detects a wake-up condition, e.g. on a switch input or start bit of a LIN message.
2. Analog die exits Voltage Regulator low power mode.
3. Analog die asserts the interrupt signal D2DINT.
4. CPU starts clock generation.
5. CPU enters interrupt handler routine
.6. CPU services interrupt and acknowledges the source on the analog die.
"
 i can change the state of L3 L5 and L6 (from state1 to state0) as a wake up condition and before going to stop mode  IRQ has been enabled by :
D2DCTL1  = 0x8F;  // IRQ enable
D2DCTL0 = 0x80; 

i think by this configuration and changing L3 , L5 or L6, MCU should exit from Stop mode but i couldn't exit from stop mode. it should be noted that BDM is Connected but i use oscilloscope for reading pin A.6 that i expected after exiting Stop mode start as a puls
this is part of my code:
void interrupt 7 RTIServiceRoutin(void)
{
CPMUFLG_RTIF=CLEAR;

   if (1==PORTA_PA6)
      {
      PORTA_PA6=0;
      }

   else
      {
      PORTA_PA6=1;
      }
}
void main(void) {
DDRA_DDRA6=1;
D2DCTL1 = 0x8F; // IRQ enable, max timeout
D2DCTL0 = 0x80; // D2D enable, 4Bit, D2DCLK=BUS

 B_MCR =0x01;

asm ANDCC #0x2F;
asm NOP;
asm (STOP);
// at this point i change the state of L3

__asm CLI;
}
Labels (1)
Tags (2)
2 Replies

787 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I have just tried your code and it works.

I measure input current to see if the MCU wakes up.

After wake-up, the MCU goes to interrupt vector 6, Vd2di_ext.

Regards,

Daniel

787 Views
guofeng
Contributor II

Hi Daniel,

   Could you introduce your method to enter the STOP mode and wake up? 

   When I test the "STOP" mode, the MCU just like running as reset after I pressed the button to wake up the device . The device always stay in low-power mode finally!

   I will appreciate it if you could help me!

    

   Regards,

   Guofeng Lai

0 Kudos
Reply