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.

Linux/AM5728: GPIO status change

Part Number: AM5728

Tool/software: Linux

Hello , every time when I use

echo 57 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio57/direction

then the Gpio 's status(the yellow signal) changed .

Is that normal?

In my project ,this is not expected ,please help me.

  • Hi Philos,

    Do you use AM57x PSDK Linux? If yes, which version?

    Do you use AM572x TI board (EVM or IDK) or custom board?

    What value you have in below entry?


    /sys/class/gpio/gpio57/value

    "value" - reads as either 0 (low) or 1 (high). If the GPIO is configured as an output, this value may be written; any nonzero value is treated as high.




    
    



    Regards,
    Pavel

  • Thanks for reply,Pavel

    I am not using PSDK Linux,

    because I am using EVM borad(which is also called bb_x15)

    cat /sys/class/gpio/gpio57/value

    the value is 0.

    I searched and found something in

    I think maybe I should use

    echo 57 > /sys/class/gpio/export
    echo high > /sys/class/gpio/gpio57/direction

    in order to make sure the status of gpio57 won't change.

  • Philos,

    In this forum, only PSDK Linux is supported.

    From what I understand, gpio57 (yellow signal) is low (0) before you set the direction to output, and you need to stay low after that.

    For general direction, I can provide you below hints:

    - check if you have internal or external pull up resistor, that is making this signal high. Internal pull up is configured in CTRL_CORE_PAD_x [16] [17] bits

    - check what value you have in your GPIO_DATAOUT register, make sure you have 0 for gpio57. Check also GPIO_SETDATAOUT, GPIO_CLEARDATAOUT, and TRM section "27.4.8 General-Purpose Interface Data Input/Output Capabilities"

    Regards,
    Pavel