This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: GPIO Read always get '0' in GPIO0_IN_DATA23 Register

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: SYSCONFIG


Hello TI team.

We have a problem that GPIO0_39 Read always get '0' in GPIO0_IN_DATA23 Register when we try to read a GPIO input.

Below is our Pin Configurations and test result of uboot Memory Write/Dump command.

What operation we missed on Pin Read? Please help us, thanks.


============================[CPU CLK of IP810I] GPIO1_10========================================
GPIO [CPU CLK of IP810I] PADCFG_PADCONFIG104 LOCATION PIN_MCASP0_AXR0

PADCFG_PADCONFIG104 Register Address 000f41a0 (Write 00010007 for mode GPIO pad)
GPIO Direction Register Address 00601010 (Write bit10 '0' for Output)
GPIO GPIO0_OUT_DATA01 Register Address 00601014 (Write bit10 '0': Low / '1':High)

GPIO Control write actions of [CPU CLK of IP810I]

INIT:
Write Address 000f41a0 Data 00010007 PAD Configuration

SET PIN DIRECTION OUT
Write Address 00601010 Data XXXX_XXXX_XXXX_XXXX_XXXX_X0XX_XXXX_XXXXb (Bit 10 = 0)

SET CLK HIGH
Write Address 00601014 Data XXXX_XXXX_XXXX_XXXX_XXXX_X1XX_XXXX_XXXXb (Bit 10 = 1)

SET CLK LOW
Write Address 00601014 Data XXXX_XXXX_XXXX_XXXX_XXXX_X0XX_XXXX_XXXXb (Bit 10 = 0)


============================[CPU DATA of IP810I] GPIO0_39========================================
GPIO [CPU DATA of IP810I] PADCFG_PADCONFIG40 LOCATION PIN_GPMC0_WPN

PADCFG_PADCONFIG40 Register Address 000f40a0 (Write 00010007 for mode GPIO pad)
GPIO Direction Register Address 00600038 (Write bit7 '0':Output. '1':Input)
GPIO GPIO0_OUT_DATA23 Register Address 0060003c (Write bit7 '0': Low / '1':High)
GPIO GPIO0_IN_DATA23 Register Address 00600048 (Read bit7 '0': Low / '1':High)


GPIO Control write actions of [CPU DATA of IP810I]


INIT
Write Address 000f40a0 Data 00010007 PAD Configuration


SET PIN DIRECTION OUT
Write Address 00600038 Data XXXX_XXXX_XXXX_XXXX_XXXX_XXXX_0XXX_XXXXb (Bit 7 = 0)

SET PIN DIRECTION IN
Write Address 00600038 Data XXXX_XXXX_XXXX_XXXX_XXXX_XXXX_1XXX_XXXXb (Bit 7 = 1)

SET DATA HIGH
Write Address 0060003c Data XXXX_XXXX_XXXX_XXXX_XXXX_XXXX_1XXX_XXXXb (Bit 7 = 1)

SET DATA LOW
Write Address 0060003c Data XXXX_XXXX_XXXX_XXXX_XXXX_XXXX_0XXX_XXXXb (Bit 7 = 0)

GET DATA BIT
Read Address 00600048 Data XXXX_XXXX_XXXX_XXXX_XXXX_XXXX_BXXX_XXXXb (Get Bit 7)


Below is our test using uboot Memory Write/Dump commands.


[Get GPIO Register Values]
=> md 00600000
00600000: 44832905 00000001 00000000 00000000 .).D............
00600010: ffffffff 00000000 00000000 00000000 ................
00600020: 01218000 00000000 00000000 00000000 ..!.............
00600030: 00000000 00000000 ffffffff 00000000 ................
00600040: 00000000 00000000 00000000 00000000 ................
00600050: 00000000 00000000 00000000 00000000 ................
00600060: ffffffff 00000000 00000000 00000000 ................
00600070: 00200000 00000000 00000000 00000000 .. .............
00600080: 00000000 00000000 ffffffff 00000000 ................
00600090: 00000000 00000000 00000000 00000000 ................
006000a0: 00000000 00000000 00000000 00000000 ................
006000b0: ffffffff 00000000 00000000 00000000 ................
006000c0: 00000000 00000000 00000000 00000000 ................
006000d0: 00000000 00000000 00000000 00000000 ................
006000e0: 00000000 00000000 00000000 00000000 ................
006000f0: 00000000 00000000 00000000 00000000 ................

[Set PADCFG_PADCONFIG40 Value]
=> mw 000f40a0 00010007

[Get GPIO Register Values]
=> md 00600000
00600000: 44832905 00000001 00000000 00000000 .).D............
00600010: ffffffff 00000000 00000000 00000000 ................
00600020: 01218000 00000000 00000000 00000000 ..!.............
00600030: 00000000 00000000 ffffffff 00000000 ................
00600040: 00000000 00000000 00000000 00000000 ................
00600050: 00000000 00000000 00000000 00000000 ................
00600060: ffffffff 00000000 00000000 00000000 ................
00600070: 00210000 00000000 00000000 00000000 ..!.............
00600080: 00000000 00000000 ffffffff 00000000 ................
00600090: 00000000 00000000 00000000 00000000 ................
006000a0: 00000000 00000000 00000000 00000000 ................
006000b0: ffffffff 00000000 00000000 00000000 ................
006000c0: 00000000 00000000 00000000 00000000 ................
006000d0: 00000000 00000000 00000000 00000000 ................
006000e0: 00000000 00000000 00000000 00000000 ................
006000f0: 00000000 00000000 00000000 00000000 ................

[Set GPIO0_23 Direction Value (All input)]
=> mw 00600038 ffffffff

[Get GPIO Register Values]
=> md 00600000
00600000: 44832905 00000001 00000000 00000000 .).D............
00600010: ffffffff 00000000 00000000 00000000 ................
00600020: 01218000 00000000 00000000 00000000 ..!.............
00600030: 00000000 00000000 ffffffff 00000000 ................
00600040: 00000000 00000000 00000000 00000000 ................
00600050: 00000000 00000000 00000000 00000000 ................
00600060: ffffffff 00000000 00000000 00000000 ................
00600070: 00210000 00000000 00000000 00000000 ..!.............
00600080: 00000000 00000000 ffffffff 00000000 ................
00600090: 00000000 00000000 00000000 00000000 ................
006000a0: 00000000 00000000 00000000 00000000 ................
006000b0: ffffffff 00000000 00000000 00000000 ................
006000c0: 00000000 00000000 00000000 00000000 ................
006000d0: 00000000 00000000 00000000 00000000 ................
006000e0: 00000000 00000000 00000000 00000000 ................
006000f0: 00000000 00000000 00000000 00000000 ................

The GPIO0_IN_DATA23 address 00600048 refelect input bit '0'.


Apply High Level to pin GPIO0_39, Read GPIO register again.
=> md 00600000
00600000: 44832905 00000001 00000000 00000000 .).D............
00600010: ffffffff 00000000 00000000 00000000 ................
00600020: 01218000 00000000 00000000 00000000 ..!.............
00600030: 00000000 00000000 ffffffff 00000000 ................
00600040: 00000000 00000000 00000000 00000000 ................
00600050: 00000000 00000000 00000000 00000000 ................
00600060: ffffffff 00000000 00000000 00000000 ................
00600070: 00210000 00000000 00000000 00000000 ..!.............
00600080: 00000000 00000000 ffffffff 00000000 ................
00600090: 00000000 00000000 00000000 00000000 ................
006000a0: 00000000 00000000 00000000 00000000 ................
006000b0: ffffffff 00000000 00000000 00000000 ................
006000c0: 00000000 00000000 00000000 00000000 ................
006000d0: 00000000 00000000 00000000 00000000 ................
006000e0: 00000000 00000000 00000000 00000000 ................
006000f0: 00000000 00000000 00000000 00000000 ................

The GPIO0_IN_DATA23 address 00600048 refelect input bit is still '0'.