Verdin i.mx8mp low power and sleep modes

Hello,

I’m trying to piece together the workings of “s2idle” and “deep” sleep mode for the i.mx8mp. My first issue is it’s not mentioned here:

but I used the steps for the 8M Mini with no apparent issues despite the fact this is handled very differently between the two processors.

My requirements are pretty simple, put the processor in a low power sleep mode when necessary and wake it up with a button press. I can do as much but I would like a better understanding of what peripherals are in which state at that time. I need to know what clocks, if any are running and at what frequency as they have the potential to create some imaging noise in the companion medical device.

Hi @rlushster ,

You can find more information about what happens in each sleep mode on the i.MX8M Mini Reference Manual provided by NXP, the topic 5.2.4 Functional Description might provide useful information.

Also, you can find more information about the sleep modes here.

Please let me know if you have any doubts.

Best regards,
Daniel Morais

Thank you. I spent a lot of time in the reference manual and felt even more confused but the text file you shared is gold if it applies. However the link you shared was for the 8M Mini and the documentation says the 8M Plus uses the System Mode Controller while the 8M Mini uses Power Management Driver. The System Mode Controller seems to be much more complicated with its time slot mechanism. I’m not sure how to decode what’s getting powered down and in what order.

Hi @rlushster ,

Sorry, please find here the link for the iMX8MP.

Yes, the system is complicated, do you think it can cause some noise in the system coming up from sleep? In my concern, it might be good to find which peripherals come up in each order, but I think that the best approach should be waking up the module and checking the noises.

Best regards,
Daniel Morais

Going into and out of the sleep mode should not cause any problems. We will put the machine in “imaging mode” which will really just be “deep” or “s2idle” and wont wake it up until after the image (MRI) is complete. Technically I can just test it and if it fits it ships but we need to rent the time on the MRI and I want to be prepared for as much as possible. The only peripherals I’m really using is I2C, GPIO and a UART and they will all be turned off (if I understand things correctly and follow the rules). Wakeup will be done with a single button.

Any issue with using

echo +5 > /sys/class/rtc/rtc1/wakealarm; 
echo deep > /sys/power/mem_sleep; 
echo mem > /sys/power/state

to change the state of the 8M Plus? It specifically says those commands are for the 8M Mini.

If I have time I would also like to try running the M7 at like 10MHz while the A53 complex is in sleep mode to blink a standby light. Right now they are using a 555 to blink a light. I haven’t used a 555 since high school electronics.

Hi @rlushster

I made a small test on my side and it works on Verdin iMX8MP.

We are checking internally the documentation and will update it as soon as possible.

Please let me know if you have any more doubts.

Best regards,
Daniel Morais

Hi @daniel_m.tx,

Is there a simple way to shut the system down when it wakes up from an RTC event? I want to shut the system down if it has been in deep or s2idle for more than 30 minutes.

Hello, @rlushster

I believe you can store the RTC time when the system sleeps. Then, a service can be runned as soon as the system wakes up, and checks the previous RTC value and the current one in order to verify if the system has been sleeping for more than 30 minutes.

Best regards,
Felipe Madureira