CTRL_PWR_BTN_MICO and Power Failure in Verdin imx8mm

Hi,

We are working on a custom carrier board for the Verdin imx8mm in which we have a power backup system.

We have a Power Faliure (/PF) signal which goes low when the power supply is disconnected, the backup system should then provide power for 20-30s in which time we would like the board to shutdown safely.

What would be the recomended way to achieve this in with Torizon Core ?

Reading the Verdin IMX8MM datasheet I found this:

The Verdin iMX8M Mini features a power button input signal (CTRL_PWR_BTN_MICO#, pin 248).
This input signal is connected directly to the ONOFF input of the i.MX 8M Mini SoC. A short press
(<5s) starts the power-up sequence if the module is shut down. If the module is running, a short
press (<5s) will create an interrupt. It depends on the settings in the operating system whether this
interrupt will initiate a power-down sequence or some other reaction. A long press (>5s) of the
CTRL_PWR_BTN_MICO# will initiate the power-down sequence of the PMIC, independent of the
operating system (force off).

Could CTRL_PWR_BTN_MICO# be used for the /PF purposes ?
What is the specific behaviour of Torizon when this interrupt happens ? Testing it with the uart open I can see “Termina” (Terminate pehraps ?) printed out. So it does seem that Torizon starts a shutdown sequence and it is not the PMIC doing a force off ?

Thanks in advance,
Jaume

Hello jcabecerans,

ok there are multiple option but it is quite complex.
So let me start here. Please also take a look at the Power states and sequences in our verdin design guide.
So if you cut the power to the board nothing will usually break we are using a journaled file system and the system will boot when the power comes back. But if you want to have some time to do something on your application side for which you need time, e.g. saving some variables or send something to the cloud the backup can be useful.
I don’t know how your Power Failure circuit looks like. But keep in mind that if you shutdown the module via CTRL_PWR_BTN_MICO you need to assert it when you want to switch the board back on or power cycle it. this sounds obvious since we are talking here about a a PF right. But what happens when your PF circuit detects a low voltage and triggers an shutdown and at the end the PF is not happening but the voltage is stabilizing right after it went under your threshold? Then the board will shut down and only boot back up when you trigger the PWR_BTN.

So would be great if you could share more about the planed PF circuit

Best Regards,

Matthias Gohlke

Hi @matthias.tx,

I see, it is more complex that we thought. Thanks for pointing out this edge case.
If not through CTRL_PWR_BTN_MICO, what would be the recomended approach ?

Thanks,
Jaume

(PF circuit)
image

Hello jcabecerans,

I would recommend a zoom call to discus this.
Whenn do you have time this week?

Best regards,

Matthias

Hi @matthias.tx ,

Sorry, somehow I missed the notification of your repply.
I will talk it internally with the HW engineer in charge of this board, it probably makes the most sense to invite him to the call since I am mostly SW.

Thanks,
Jaume

hello jcabecerans,

ok just get back to us before you fix the design.
Also be aware that we offer design reviews for our customer.

Best Regards,

Matthias Gohlke