How to put iMX6Q into standby with a button (GPIO).

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

How to put iMX6Q into standby with a button (GPIO).

Jump to solution
1,826 Views
YamilGarcia
Contributor III

I'm using a sabrelite development board running linux. I would like to put iMX6Q into standby mode through a button (GPIO), currently I'm able to wake it up from standby through a button (GPIO), but I can't figure out any way to set up a GPIO to put iMX6Q into any power saving mode (standby, mem, etc).

Can someone give me a hint on this?

0 Kudos
1 Solution
935 Views
TheAdmiral
NXP Employee
NXP Employee

I can give you a hint from the hardware perspective, but this is really a very involved process for software:

First, you must sense the GPIO button press. The GPIO should be coded to generate an IRQ interrupt.

Next, the software must be configured to place all peripherals in a standby mode, or an off mode.

Once the software has placed the system in a condition where it can go into standby, it then places DDR memory in self-refresh.

Finally, software sends a request to the SNVS module to pull PMIC_STBY_REQ high. This is the actual HW signal that will place the power system in a low power mode. (By the way, the Linux code needs to program the PMIC with the right voltage settings for standby mode. This probably should be done when the Linux code first boots up, but can be left as part of the standby housekeeping functions.)

To come out of standby, the user presses the ONOFF button, which triggers the SNVS module to de-assert the PMIC_STBY_REQ signal. Note that the GPIO button will not be able to bring a system out of standby unless the GPIO rail is powered and VDDARM and VDDSOC are left fully powered. (not really a power saving mode at this point).

Once the power rails turn back on, something needs to trigger the ARMCORE to bring the rest of the system out of standby, but I'm not sure what that something is either.

My best recommendation would be to look at the Android source code for the SABRE Smart Device board. It already has standby functionality. You can probably reuse much of the code.

If more information is needed, this should be directed to the SW Android team.

Cheers,

Mark

View solution in original post

0 Kudos
3 Replies
936 Views
TheAdmiral
NXP Employee
NXP Employee

I can give you a hint from the hardware perspective, but this is really a very involved process for software:

First, you must sense the GPIO button press. The GPIO should be coded to generate an IRQ interrupt.

Next, the software must be configured to place all peripherals in a standby mode, or an off mode.

Once the software has placed the system in a condition where it can go into standby, it then places DDR memory in self-refresh.

Finally, software sends a request to the SNVS module to pull PMIC_STBY_REQ high. This is the actual HW signal that will place the power system in a low power mode. (By the way, the Linux code needs to program the PMIC with the right voltage settings for standby mode. This probably should be done when the Linux code first boots up, but can be left as part of the standby housekeeping functions.)

To come out of standby, the user presses the ONOFF button, which triggers the SNVS module to de-assert the PMIC_STBY_REQ signal. Note that the GPIO button will not be able to bring a system out of standby unless the GPIO rail is powered and VDDARM and VDDSOC are left fully powered. (not really a power saving mode at this point).

Once the power rails turn back on, something needs to trigger the ARMCORE to bring the rest of the system out of standby, but I'm not sure what that something is either.

My best recommendation would be to look at the Android source code for the SABRE Smart Device board. It already has standby functionality. You can probably reuse much of the code.

If more information is needed, this should be directed to the SW Android team.

Cheers,

Mark

0 Kudos
935 Views
YamilGarcia
Contributor III

Thanks a lot for you post Mark.

I did it already using exactly the same method and it is working fine.

Regards,

Yamil Garcia.

0 Kudos
935 Views
TheAdmiral
NXP Employee
NXP Employee

Thank you for the kind words. Hope the rest of your i.MX 6 project goes well.

Cheers,

Mark

0 Kudos