cancel
Showing results for 
Search instead for 
Did you mean: 

STPMIC1 - POWER_ON ALTERNATE & MAIN mode

SYEH
Associate II

Hi There,

When the STPMIC1 goes into POWER_ON ALTERNATE mode via the PWRCTRL pin, does the activation of other Turn-ON condition sources like PONKEY or WAKEUP pins will have a resulting effect to the state of POWER_ON mode? (i.e. also triggers the PMIC back to POWER_ON MAIN mode etc?)

Thanks,

Regards,

Steven

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @SYEH​ 

No, Turn-ON condition only have effect when STPMIC1 is in OFF state.

Refer to https://www.st.com/resource/en/datasheet/stpmic1.pdf and Figure 53. STPMIC1 state machine.

Hope it help,

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
PatrickF
ST Employee

Let's add some details when STPMIC1 is used with STM32MP1x processor:

PONKEY could be set to generate INTn, which could be managed by STM32MP1x as a wakeup pin (if not in OFF/VBAT mode), so set PWR_ON (PWRCTRL) to 1 which put back PMIC to MAIN mode.

Similarly, as WAKEUP is only used in OFF/VBAT state, in other states (STANDBY or above), WAKEUP (from RTC) is used in STM32MP1x as an internal wakeup source, which toggle PWR_ON (PWRCTRL) to 1 which put back PMIC to MAIN mode.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
SYEH
Associate II

Thanks the prompt reply,

Understood. May I confirm with you on the "poweroff" command behaviour when used on the STM32MP157C-EV1 evaluation board? As I find it quite confusing when trying to map it to with STMIC1 state machine, especially I can actually wake up the STM32MP157C Evaluation board when pressing the Wake Up button (connected nPONKEY on the STPMIC1) when I have shut the device via "poweroff" command.

Does it follows the following sequence:

  • type in "poweroff" in linux console to initiate device power off
  • Linux kernal starts shutdown process, and when ready, it toggles PWRCTRL (PWR_ON pin on STM32MP157C) to put STPMIC1 into ALTERNATE POWER_ON mode
  • When TURN ON Condition for the STMIC1 is triggered (i.e. nPONKEY asserted), the INT_N signal is asserted to low due to pending interrupt, which feeds into the PA0 port of the STM32MP157C, and somehow triggers the SoC to toggles PWRCTRL signal to bring the STMIC1 from ALTERNATE mode to MAIN POWER_ON mode.
  • Device starts normal power on process.

This is what I am guessing based on my hardware signal measurement, but would be great if you can clarify it for me.

Thanks.

Regards,

Steven

Olivier GALLIEN
ST Employee

Hi @SYEH​ ,

In case of "poweroff" STPMIC is set in OFF mode not in ALERNATE POWER_ON.

In that case pressing Wake Up button connected to nPONKEY behave as a normal Turn On condition.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
PatrickF
ST Employee

Yes, your understanding is correct.

What you list is a STANDBY state entry/exit, PMIC is still ON and supply VDD (Buck2).

By default, in our Starter Package, STANDBY mode is used for "shutdown" or "poweroff" command.

You should modify the TF-A DeviceTree to map them to a PMIC OFF mode (save more power, but similar for Linux reboot point of view).

see https://wiki.st.com/stm32mpu/wiki/PMIC_hardware_components

AN5109 and AN5284 could help to understand power modes.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
SYEH
Associate II

Thanks on the answers. All clear now. Cheers.