wake-up from power down in imx8mp

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

wake-up from power down in imx8mp

Jump to solution
1,545 Views
diegoperez
Contributor II

Is it possible to wake up from power down in imx8mp using a timer?

According to this scheme it seems to be possible:

diegoperez_0-1669740513407.png

Thanks and BR

0 Kudos
1 Solution
1,434 Views
riteshmpatel
NXP TechSupport
NXP TechSupport

Hi @diegoperez,

Apologies for the delay in response.

 

I discussed with our engineering team and conclude that older BSPs might not support proper power down (required for SNVS->RUN mode transition)  using poweroff or shutdown now command

 

 
Please Try with below-mentioned steps:
 
1. sync the RTC with the system clock
#hwclock -w
 
2. Set the RTC alarm to be "s" seconds later than the current time
#echo +s > /sys/class/rtc/rtc0/wakealarm
 
        you can use the command "cat /proc/driver/rtc" to check the RTC status:

       # cat /proc/driver/rtc
       rtc_time        : 12:21:44
       rtc_date        : 2021-03-24
       alrm_time       : 12:22:12
       alrm_date       : 2021-03-24
       alarm_IRQ       : yes
       alrm_pending    : no
       update IRQ enabled      : no
       periodic IRQ enabled    : no
       periodic IRQ frequency  : 1
      max user IRQ frequency  : 64
      24hr            : yes
  
      alarm_IRQ is "yes" which means that the RTC alarm is active now.
 
 
 3. To Put the System in SNVS/Power down mode any one of the below options can be used :
  •      #shutdown now        (only supported in latest BSP  LF 5.15.52_2.1.0)
  •      #powerdown              (only supported in latest BSP  LF 5.15.52_2.1.0)
  •      Press the ONOFF button for 5 seconds to power off the board.
 
The board will power on automatically when it reaches alarm time.

Thanks & Regards,
Ritesh M Patel

View solution in original post

0 Kudos
6 Replies
1,527 Views
riteshmpatel
NXP TechSupport
NXP TechSupport

Hi @diegoperez,

I hope you are doing well.

It is possible to wake up from power off with an interrupt event to the PMIC from the snvs-rtc timer in i.MX8MP.

Thanks & Regards,
Ritesh M Patel

0 Kudos
1,493 Views
diegoperez
Contributor II

Hi @riteshmpatel 

I'm trying to figure out how to setup the timer event to wake up from power down. It could be the register LPTAR but it there is not reported in the 6.4.5.1 SNVS register descriptions.

diegoperez_0-1670430971466.png

 

Could you please tell me which registers I have to program to perform the alarm event?

 

Thanks.

 

0 Kudos
1,482 Views
riteshmpatel
NXP TechSupport
NXP TechSupport

Hi @diegoperez,

Detailed descriptions of each SNVS register can be found in Security Reference Manual for i.MX 8M Plus Applications Processor.
 
rtc-snvs.c driver is used to setting and reading alarms in imx processors.
One can look at /drivers/rtc/rtc-snvs.c in the linux-imx for more information regarding the snvs rtc alarm.
 
Thanks & Regards,
Ritesh M Patel
0 Kudos
1,464 Views
diegoperez
Contributor II

Hi @riteshmpatel 

I followed yours prompts and I can wakeup from sleep mode but I can't wake up from power down.

Do I need additional configuration to wake up from power down (only snvs rail is on)?

 

Tanks and best regards.

0 Kudos
1,435 Views
riteshmpatel
NXP TechSupport
NXP TechSupport

Hi @diegoperez,

Apologies for the delay in response.

 

I discussed with our engineering team and conclude that older BSPs might not support proper power down (required for SNVS->RUN mode transition)  using poweroff or shutdown now command

 

 
Please Try with below-mentioned steps:
 
1. sync the RTC with the system clock
#hwclock -w
 
2. Set the RTC alarm to be "s" seconds later than the current time
#echo +s > /sys/class/rtc/rtc0/wakealarm
 
        you can use the command "cat /proc/driver/rtc" to check the RTC status:

       # cat /proc/driver/rtc
       rtc_time        : 12:21:44
       rtc_date        : 2021-03-24
       alrm_time       : 12:22:12
       alrm_date       : 2021-03-24
       alarm_IRQ       : yes
       alrm_pending    : no
       update IRQ enabled      : no
       periodic IRQ enabled    : no
       periodic IRQ frequency  : 1
      max user IRQ frequency  : 64
      24hr            : yes
  
      alarm_IRQ is "yes" which means that the RTC alarm is active now.
 
 
 3. To Put the System in SNVS/Power down mode any one of the below options can be used :
  •      #shutdown now        (only supported in latest BSP  LF 5.15.52_2.1.0)
  •      #powerdown              (only supported in latest BSP  LF 5.15.52_2.1.0)
  •      Press the ONOFF button for 5 seconds to power off the board.
 
The board will power on automatically when it reaches alarm time.

Thanks & Regards,
Ritesh M Patel
0 Kudos
536 Views
ChristianAndersen
Contributor I

Hi @riteshmpatel 

What has been changed in the BSP to enable support of SNVS/Power down mode when using shutdown/poweroff?

Thanks!

Regards
Christian Andersen

0 Kudos