i.MX6UL pwrkey: restart/wake-up behaviour

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

i.MX6UL pwrkey: restart/wake-up behaviour

2,079 Views
ioan-alexandrul
Contributor I

Hello,

I'm looking for a little clarification regarding the expected behaviour of the i.MX6UL when asserting pmic_en_b after it was turned off, in dumb PMIC mode.

I have a custom board running Linux 3.14.52; the board is custom, but the ONOFF signal & friends are driven similarly to the MX6EVK. I'm trying to get it to turn off when the button is asserted for more than 5 seconds, then immediately turn back on ("immediately" can be either instantly, or as soon as the button is depressed, both options are ok) Basically, I'm trying to do a cold reset.

My attempts so far have been unsuccessful, and I'm beginning to suspect that my understanding of how the device behaves is incorrect. I would greatly appreciate if someone who's more familiar with the SNVS subsystem could help me with some clarification on the following:

1. The reference manual states that the "Off to On time" is "the time it takes to request power on after the configured button press time has been reached." (emphasis mine). In this case:

1a. In dumb PMIC mode, does the device request power on only after it senses a press event, i.e. only after a falling edge followed by a low level being held for at least 0-500 msec, depending on LPCR[20:21] (ON_TIME)?

In other words: suppose I press the button for 6 seconds. After 5 seconds, the device shuts down, but the button continues to be held down. Is this level registered by the SNVS, which would issue a pmic_en_b if the button remains held down for the right amount of time, or does the signal have to be driven high again before a low level can trigger an off-on transition?

1b. The BTN_CONFIG bits in HPCR only affect the behaviour of the device in high-power mode, right?

2. When the device is in high-power mode, does a long press of the button result in the TOP bit of LPCR being set automatically? Or does that generate an interrupt that needs to be handled in software by (among other things) setting the TOP bit?

Thanks!

Labels (3)
0 Kudos
4 Replies

945 Views
Yuri
NXP Employee
NXP Employee

  As for the questions, please refer to section 10.5 [ONOFF (Button)] of i.MX6 UL Reference
Manual (). 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.

945 Views
ioan-alexandrul
Contributor I

Hi Yuri,

Thanks for your answer. I was, however, asking for clarification precisely with regard to section 10.5. It describes the behaviour in terms of button presses, not signal levels, and I wanted to know if my understanding in terms of signal levels was correct.

Let me clarify: for the off to on transition, section 10.5 says this: "This configuration supports the time it takes to request power on **after the configured button press time has been reached**. Once the button is pressed longer than the configuration time, the state machine will transition from the OFF to the ON state." (Emphasis mine).

Question: Consider the timing diagram below:

Untitled.png

In the second situation (ONOFF (2)), the button is held down for t_onoff (max timeout configured using the BTN_PRESS_TIME bits in LPCR). At moment 'e', the device turns off. The button is then held down for t_offon (configured using the ON_TIME bits of the LPCR register), so at the time instant 'g', the device turns on. I have this behaviour working at the moment.

What I want to know is if, for the first situation (ONOFF(1)), the device can be configured to turn on at the moment 'c', even though the ONOFF signal was not de-asserted at 'e'.

I.e. if I just keep the button pressed for more than BTN_PRESS_TIME + 2 * DEBOUNCE + ON_TIME, without de-pressing it, is the device supposed to turn on? Or does the power management module need to sense a falling edge on ONOFF in order for the countdown to ON_TIME to be started?

0 Kudos

945 Views
Yuri
NXP Employee
NXP Employee

Hello,

  In Your case PMIC_ON_REQ gets HIGH, because of LOW state of the i.MX6 ONOFF pin during debounce

time, since i.MX6 is unpowered. As result - power ON sequence starts. To avoid it ONOFF should be always

powered  by VDD_SNVS_IN.

 

Regards,

Yuri.

0 Kudos

945 Views
Yuri
NXP Employee
NXP Employee

Hello,

  General considerations about power on via ONOFF key are considered

in the following thread :

 

https://community.nxp.com/docs/DOC-97660 

 

 Also, the following may be useful :

"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."

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------