imx287 GPIO default value

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

imx287 GPIO default value

510 Views
adityapatil
Contributor II

hi, 

1. I am working on imx287 custom board using Linux-2.6.35.3

2. How can I keep the gpio value to be low by default.

3. After Restart my gpio are at high state 3.3v

-Thanks

Aditya

Labels (2)
0 Kudos
1 Reply

382 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Aditya,

You can program the GPIO at the initialization of the board it takes minimun time. 

First you need to export the GPIO you want to test to the user space:

echo XX > /sys/class/gpio/export

XX shall be determined by the following algorithm:

GPIOA_[B] is the GPIO you want to export, where "A" is the GPIO bank and "B" is the offset of the pin in the bank. if the first available GPIO bank is 0 // (iMX.28, for example)     XX = A*32 + B; else // first GPIO bank is 1     XX = (A-1)*32 + B;

Regards