Power on Push button Switch

Dear Team,

I am planning to use apalis imx8 to develop a QT application, which boots on startup.

The plan wasas following

  1. When toradex is powered. it goes to a sleep state (ie with uboot starting but system in a low power mode)

  2. The system will be waiting for change in Gpio ( connected to Push button). When its pressed and hold for X Seconds, Normal boot of toradex happens.

I assume to implement this change , some modifications need to be done on uboot. But is it possible to give reference to perform these changes
especially on following points

a. Is there a low power or sleep state possible in uboot , if so any reference regarding switching to same.

b. entry point to u boot where we can implement the wait part

Thanks very much in advance

Regards,

Dear @knaneesh, how are you?

May I ask you more details about your goal?

  • Why exactly do you want to suspend your board once you power it? Is your goal to have a power-on button or a wake-up button?
  • Which image do you intend to use? Is this one of our Reference Images or TorizonCore?
  • Which carrier board are you going to use?

About your questions:

This would probably not be possible on u-boot as the main function of u-boot is just to boot up the kernel and the device trees. What I’d suggest you is to have a look on this article: Suspend/Resume (Linux) | Toradex Developer Center

It talks about suspend and resume modes on Linux-based systems. You can see, for instance, that for the Apalis Family, pin MXM3 37 is defined as a wake-up source by default. You can check here on the device tree how it has been made: device-trees/imx8-apalis-v1.1.dtsi at toradex_5.4-2.3.x-imx · toradex/device-trees · GitHub

Therefore, what you could do is to create a systemd service to put your system to sleep/suspend once the boot is complete. Otherwise, you could make your application to do so once it starts. Then you could use a GPIO as wake-up source.

Please tell us if this helps you already or if you’d need further assistance.

Dear @gclaudino.tx

Sorry for absence of clarity,

  • Why exactly do you want to suspend your board once you power it? Is your goal to have a power-on button or a wake-up button?

Ans- The final goal is to use a GPIO as a power on button. with use case where user can press and hold this button(for X Seconds) to turn on the toradex.

  • Which image do you intend to use? Is this one of our Reference Images or TorizonCore?

Ans - The plan is to use Reference image( Customize it if required)

  • Which carrier board are you going to use?

Ans - Ixora V1.2A Board.

I misunderstood the scope of U-Boot I guess.

The intend was to make toradex wait for above push button hold, even before boot up (ie even before kernel loading). Since this state will be only waiting for GPIO i referred it as a “low power or sleep state”.

If u-boot cannot perform this , at which level can we modify to implement this scenario ?

Thanks in advance ,

Hi @knaneesh,

Thanks for the updates.

There is already a button like this on the Ixora Carrier Board. It’s described on section 3.2.2 of the datasheet (https://docs.toradex.com/107020-ixora-v12-datasheet.pdf). This button is called SW1 On/Off. You can also follow the carrier board design guide for the module (https://docs.toradex.com/101123-apalis-arm-carrier-board-design-guide.pdf) to understand how to design the schematics of such a button on your own. In sections 3.4 to 3.6, you can better understand the power cycles and find some reference designs.

Basically what happens on Ixora is that once you plug it in, if you have the JP1 disconnected, once you connect the power supply, you’ll be in the off state. Then, once you press SW1, the module will change to power state Run where it will load kernel, device trees and so on. The other lower power consumption scenario would be the suspended case. To enter into the suspend case, however, you need to have your module running and then send a suspend request as we proposed here:

Would this be a suitable solution for you?

Thanks for the response. However

Is it possible to implement a push button timed response example as shown in below figure?

Since the time Y is (TBD). I assumed we need a software control over it rather than hardware control
The expected sequencing was as follows

The Root Question was regarding “A” in the image. As can we implement a GPIO wait before whole toradex starts.

Note: In “WaitForPowerOn” state toradex will be powered but but will just be waiting for GPIO before doing any thing.

Regards,

Hello knaneesh,

there are different Push button controllers available with different timing settings or adjustable timing . In your case, you can build a custom board and use a little micro controller instead of the linear push button controller. then you can programm the timing you want.
The Apalis SOM has already a pin which can be used to shut down the Carrier board.
The Apalsi SOM is design to power up whenever the supplie voltage is avaliable.
So if you want to power up the SOM via push button you can use the push button controller or a microcontroler on your carrier board. This is saves you power since you can shut down the power consuming peripherals on your carrier as well.

Best Regards,

Matthias