Cannot wakeup from SNVS mode in SLN-LOCAL2-IOT development kit

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

Cannot wakeup from SNVS mode in SLN-LOCAL2-IOT development kit

Jump to solution
3,328 Views
dashdwan
Contributor III

Hi,

I have already posted the same issue here which was advised to post in this community. 

I have have been modifying the source code since last week and yet the wakeup pin doesn't seems working.

 

Screenshot from 2021-10-28 20-25-20.png

This is how the Low power mode was entered.

I had also tried configuring the WAKEUP pin as:

Screenshot from 2021-10-28 20-21-45.png

This did not worked!!

 

Then I was advised to set WAKEUP as NMI. I changed it as:

Screenshot from 2021-11-01 10-29-03.png

 

Yet, I don't see any progress!!

Please help me set the wakeup pin; is there any other configurations i should modify?

0 Kudos
Reply
1 Solution
3,279 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dashdwan 

  Today, I porting one low power SNVS mode, and wake up with the WAKEUP pin(TP1->GND J7_1) , it works OK.

  Please use my attached code, you can download the code to the SLN-LOCAL2-IOT board, after POR, the led will blinking blue, then enter SNVS mode, when you use the WAKEUP pin connect to GND, chip reset, the blue led blinking again.

  Check my video:

 

Wish it helps you!

If you still have questions about it, please kindly let me know!

Best Regards,

Kerry

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

-----------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
12 Replies
3,318 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dashdwan ,

  Welcome to the MIMXRT community, I would like to help you.

  Please note, WAKEUP pin is the special pin, not the GPIO pin. You may mix the pin which can wake up the low power with the WAKEUP pin.

  Please read this RT1060 low power application note at first:

https://www.nxp.com/docs/en/application-note/AN12245.pdf

kerryzhou_0-1635837630899.png

kerryzhou_1-1635837646799.png

 

So, please check the low power mode you want to use, if you use system idle, low power idle, suspend these low power mode, you add the other GPIO for the interrupt, it's OK to wake up the low power.

But, if you want to use the SNVS, then you just can use the special WAKEUP PIN, GPIO5_IO00, no other GPIO pins.

 

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

 

0 Kudos
Reply
3,312 Views
dashdwan
Contributor III

Hi Kerry,
Thanks for responding.

I need to use the SNVS mode. As i mentioned in the previous thread, I tried entering the SNVS mode as mentioned in the Application Note (as shown below):

Screenshot from 2021-11-02 12-58-33.png

After this when i give a low signal to the WAKEUP pin, it should wake the target right?

But this is not happening in my case. I wanted to know whether there is any additional changes to be made in order to wake up the device from SNVS mode. Could you please help me with that?

Also, feel free to correct me if I have got any of the points wrong.

0 Kudos
Reply
3,308 Views
kerryzhou
NXP TechSupport
NXP TechSupport

HI @dashdwan 

 Tell me which detail pin in the SLN-LOCAL2-IOT hardware you used as the WAKEUP pin, just help you to check it.

  BTW, how do you determine the chip is not waked up.

Best Regards,

Kerry

0 Kudos
Reply
3,302 Views
dashdwan
Contributor III

I have used the L6 pin (GPIO5) as wakeup pin:

Screenshot from 2021-11-02 14-23-33.png

 

I am implementing an LED blink function like the code snippet shown below.

 

void led_task(void *arg)
{
while(1)
{
RGB_LED_SetColor(LED_COLOR_GREEN);
vTaskDelay(3000);
RGB_LED_SetColor(LED_COLOR_PURPLE);
vTaskDelay(3000);
RGB_LED_SetColor(LED_COLOR_YELLOW);
vTaskDelay(3000);
RGB_LED_SetColor(LED_COLOR_WHITE);
vTaskDelay(3000);
RGB_LED_SetColor(LED_COLOR_RED);
vTaskDelay(5000);

SNVS->LPCR |= SNVS_LPCR_TOP_MASK;
while(1)
{
}
}
}

 

I tested with this code, the system stops the LED blinking, but doesn't start again after initiating the wakeup.

I hope it's clear.

0 Kudos
Reply
3,296 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dashdwan ,

  Thanks for your information.

  Your used referece code checking, you are using the RT1060 SDK code:

SDK_2_10_1_EVK-MIMXRT1060\boards\evkmimxrt1060\demo_apps\power_mode_switch\rtos

Right?

  Please confirm it!

if you are not use the above code, you need to make sure the wakeup pin configuration in the pin_mux.c

/* GPIO configuration of SD_PWREN on WAKEUP (pin L6) */
gpio_pin_config_t SD_PWREN_config = {
.direction = kGPIO_DigitalInput,
.outputLogic = 0U,
.interruptMode = kGPIO_IntRisingEdge
};
/* Initialize GPIO functionality on WAKEUP (pin L6) */
GPIO_PinInit(GPIO5, 0U, &SD_PWREN_config);
/* Enable GPIO pin interrupt on WAKEUP (pin L6) */
GPIO_PortEnableInterrupts(GPIO5, 1U << 0U);

IOMUXC_SetPinMux(IOMUXC_SNVS_WAKEUP_GPIO5_IO00, 0U);

 

void APP_WAKEUP_GPT_IRQn_HANDLER(void)
{
GPT_ClearStatusFlags(APP_WAKEUP_GPT_BASE, kGPT_OutputCompare1Flag);
GPT_StopTimer(APP_WAKEUP_GPT_BASE);
LPM_DisableWakeupSource(APP_WAKEUP_GPT_IRQn);

xSemaphoreGiveFromISR(s_wakeupSig, NULL);
portYIELD_FROM_ISR(pdTRUE);
__DSB();
}

Tomorrow, I will help you to test it on my SLN-LOCAL2-IOT board, then give you feedback.

Best Regards,

kerry

0 Kudos
Reply
3,285 Views
dashdwan
Contributor III

Hi @kerryzhou 

I tried the configurations mentioned in the previous post, except this (i guess this function has few more dependencies):

void APP_WAKEUP_GPT_IRQn_HANDLER(void)
{
GPT_ClearStatusFlags(APP_WAKEUP_GPT_BASE, kGPT_OutputCompare1Flag);
GPT_StopTimer(APP_WAKEUP_GPT_BASE);
LPM_DisableWakeupSource(APP_WAKEUP_GPT_IRQn);

xSemaphoreGiveFromISR(s_wakeupSig, NULL);
portYIELD_FROM_ISR(pdTRUE);

__DSB();
}

Still i was unable to wake the target.

0 Kudos
Reply
3,280 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dashdwan 

  Today, I porting one low power SNVS mode, and wake up with the WAKEUP pin(TP1->GND J7_1) , it works OK.

  Please use my attached code, you can download the code to the SLN-LOCAL2-IOT board, after POR, the led will blinking blue, then enter SNVS mode, when you use the WAKEUP pin connect to GND, chip reset, the blue led blinking again.

  Check my video:

 

Wish it helps you!

If you still have questions about it, please kindly let me know!

Best Regards,

Kerry

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

-----------------------------------------------------------------------------

0 Kudos
Reply
3,249 Views
dashdwan
Contributor III

Hi @kerryzhou 

Thanks a lot! This code worked for me. But i have 2 queries on this:

  1. I suspect, on waking up, does the program restart from main function itself? It doesn't seem to resume from the same point where it was sent to SNVS mode. What do you think about this?
  2. Could you please elaborate what were those changes made by you in the code to get this wake up? I'd just like to know why it wasn't working for me. Is there any functions to be added or any other configuration changes?

 

0 Kudos
Reply
3,242 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  @dashdwan 

Answer your questions:

1 I suspect, on waking up, does the program restart from main function itself? It doesn't seem to resume from the same point where it was sent to SNVS mode. What do you think about this?

- Answer:  Yes, the SNVS mode wake is the reset boot. It's correct. if you need to resume from the low power enter area, you need to use other low power mode instead of the SNVS mode.

2 Could you please elaborate what were those changes made by you in the code to get this wake up? I'd just like to know why it wasn't working for me. Is there any functions to be added or any other configuration changes?

- Answer: In fact, if your low power code configuration is correct, my previous mentioned wakeup code is OK. As the WAKEUP pin will trigger the interrupt to wakeup.

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply
3,238 Views
dashdwan
Contributor III

Thanks @kerryzhou 

One more quick query,

Does suspend mode wake also reset boot? 

Tags (1)
0 Kudos
Reply
3,213 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @dashdwan 

 Sorry for my later reply!

 Suspend also reset wakeup.

 above suspend, it is the continue wakeup.

Press A for enter: Over RUN - System Over Run mode
Press B for enter: Full RUN - System Full Run mode
Press C for enter: Low Speed RUN - System Low Speed Run mode
Press D for enter: Low Power RUN - System Low Power Run mode
Press E for enter: System Idle - System Wait mode
Press F for enter: Low Power Idle - Low Power Idle mode
Press G for enter: Suspend - Suspend mode
Press H for enter: SNVS - Shutdown the system

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply
3,291 Views
dashdwan
Contributor III

Hi @kerryzhou 

Thanks for your response. I am using a different SDK right now, so I will try these changes in the pin_mux.c file and get back to you soon.

0 Kudos
Reply