The VALUE obtained by gpio25 on the two boards is different

We use GPIO25 as key input detection
We found that the detected values of some boards are reversed in the same Firwareware version. Is there any setting changed?

The following are the readings of gpio25 when the button is not pressed

board1

board2

image

did you confirm with multimeter

yes, the level is high
and the value will be change when I pressed button

how about changing it as output?
Can it change state 1 or 0?

Can not be set to out mode on the board with level inversion

I don’t see problem on WP7609 with FW R13.3:


root@swi-mdm9x28-wp:~# echo 25 > /sys/class/gpio/export
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# echo out > /sys/class/gpio/gpio25/direction
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# echo 1 > /sys/class/gpio/gpio25/value
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# cm info
Device:                        WP7609
IMEI:                          359782080100373
IMEISV:                        6
FSN:                           WA803370311610
Firmware Version:              SWI9X07Y_02.28.03.05 000000 je1122463.619014] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv_addr:0x3a MSTR_STS:0x0c1300c8 OPER:0x00000090
ns 2019/07/08 11:04:16
Bootloader Version:            SWI9X07Y_[1122463.636796] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv_addr:0x3a MSTR_STS:0x0c1300c8 OPER:0x00000090
02.28.03.05 000000 jenkins 2019/07/08 11:04:16
MCU Version:                   002.011
PRI Part Number (PN):          9908102
PRI Revision:                  001.000
Carrier PRI Name:              GENERIC
Carrier PRI Revision:          002.073_000
SKU:                           1103843
Last Reset Cause:              Reset, User Requested
Resets Count:                  Expected: 15     Unexpected: 0

I think it is possible that gpio25 has been set to interrupt so it cannot be set to output

image

In fact, our key reference is from mangoh yellow board

I organize our case as follows:

board1 (case 1)

input level is 1.8V(H) , GPIO25 value is 0 , and the status was same as MangOH yellow board , so I call it normal state.

board2 (case 2)

input level is 1.8V(H) , GPIO25 value is 1 → I don’t know why the readings are inverted , call it abnormal
image

My question is why the read value is different?

why is it set to interrupt???
Did you have some program using it ?

no, I never use any interrupt
I’m just guessing from the mangoh yellow schematic (just guess the reason why he can’t be set to out)

you can try the same FW as mine and see if it can be set to output