Jump to content

How to assign custom GPIO pin to HW power key instead of default PL03?


Andralin

Recommended Posts

Hello,

 

I'm buliding a music player for my old car using Orange Pi PC Plus. I would like to use external incoming logic levels (3.3V / 0V) to wake up the OPi from suspend state.

Could you help me how to do that?

 

Waking up using the HW button SW4 is working perfectly. I need to do this using external logic signal connected to PA11 / GPIO pin #5.

I tried the following setting in fex editor:

 

[gpio_power_key]
key_used = 1
key_io = port:PA11<6><default><default><0>

 

It doesn't work. I keep the pin on HIGH (3.3V) normally, and when I bring it to LOW state, OPi won't wake up.

I tried also changing the second parameter 6 to 0, as input function. No success.

 

Of course I have disabled the TWI0 interface in the fex editor, so pins PA12 and PA11 are available.

I tried to read pin PA11 state as input using a Python code and it reads properly ON and OFF states. But the wake up function doesn't work.

 

Could anyone give me any suggestion what shall I try to make it work?

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines