Hello everyone,
Is there a way to check for a Linux shutdown (A7) from wihtin the M4 core? or in other words, is there already a signal, or a way to signal to the M4 core that Linux has succesfully shut down?
We are using the i.MX 7ULP.
With kind regards,
Bram
Hi Bram
one can look at function MU_GetOtherCorePowerMode() defined in fsl_mu.h,
example can be found in ../demo_apps/power_mode_switch SDK_MX7ULP EVK
available on https://mcuxpresso.nxp.com/en/welcome
Best regards
igor
Thanks for the quick reply!
I tried your solution, but when I poll the MU_GetOtherCorePowerMode(MUA) during shutdown, I see it oscillating between RUN (0) and STOP (2) (see logging below). I can't determine when it Linux has finished shutting down from this data. From my understanding a Kernel driver handles setting the power mode during this time. Which driver is responsible for this power mode switching during shutdown? Or do I need to set it myself? I am using Kernel linux-imx version 5.4.70 (Hardknott).
Start of shutdown procedure:
0000044631 POWER MODE OTHER CORE A: 0
0000045631 POWER MODE OTHER CORE A: 0
0000046631 POWER MODE OTHER CORE A: 2
0000047631 POWER MODE OTHER CORE A: 0
0000048631 POWER MODE OTHER CORE A: 0
0000049631 POWER MODE OTHER CORE A: 0
0000050631 POWER MODE OTHER CORE A: 0
0000051631 POWER MODE OTHER CORE A: 2
0000052631 POWER MODE OTHER CORE A: 2
0000053631 POWER MODE OTHER CORE A: 2
0000054631 POWER MODE OTHER CORE A: 2
0000055631 POWER MODE OTHER CORE A: 2
0000056631 POWER MODE OTHER CORE A: 0
0000057631 POWER MODE OTHER CORE A: 0
0000058631 POWER MODE OTHER CORE A: 0
0000059631 POWER MODE OTHER CORE A: 0
0000060631 POWER MODE OTHER CORE A: 0
0000061631 POWER MODE OTHER CORE A: 0
0000062631 POWER MODE OTHER CORE A: 0
Shutdown completed was completed around timestamp: 0000057631
With kind regards:
Bram