System stand-by when long pressing ONOFF button

Showing results for 
Search instead for 
Did you mean: 

System stand-by when long pressing ONOFF button

Contributor I

Hi All,


  • Platform: i.MX6UL EVK
  • BSP: Linux 4.1.15
  • Flashed Default i.MX6UL EVK Binaries to micro SD.

Background: On Power up the EVK boots successfully and we get Linux console. When I press the PWR button for more than 5 seconds, the system goes to power off state.The PWR button is connected to ONOFF pad of i.MX6UL processor. When I press again the PWR button the system boots and able to get the Linux console again.

One more Experiment: Using following command, able to put the system in stand-by mode successfully.

  • echo standby > /sys/power/state

And able to wake successfully using PWR Button                                                                        


Requirement: On pressing PWR button for more than 5 seconds the system should go for standby mode. And

when PWR button is pressed again it should wake up

We would like to implement a feature, where system goes to Stand-by mode when this button is pressed.


How can we achieve this?

Is there any option to read this ONOFF PAD.?
On pressing PWR button for 5 seconds, How can we change the functionality of the system to go to stand-by mode instead of system shutdown?

Any input about this would be a great help

Thanks in advance.
With Regards,
Keshava Kumar B

Labels (2)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport



The following thread may be helpful:

i.MX6UL pwrkey: restart/wake-up behaviour 



  For wakeup  button should be pressed longer than Off to On configuration.

For power off : press button longer than the Max Timeout. Both parameters are

programmed  in LPCR register, bit fields ON_TIME and BTN_PRESS_TIME.


  In ON state, a button press > 5 sec will initiate an immediate HW shutdown

(PMIC_ON_REQ will go low). Note that this feature will only work after initialization

software clears the Power Glitch bit. So, it is possible to disable HW shutdown

in software, via the Power Glitch bit (in SNVS_LP Control (LPCR)).

Have a great day,




Note: If this post answers your question, please click the Correct Answer

button. Thank you!

0 Kudos