How to reconfigure of GPIO pins of UP board?

DDupboardDDupboard New Member Posts: 14

1) I want to know and learn how to reconfigure GPIO pins?
2) I want to set gpio pins as DPI parallel RGB888 output?

Answers

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    Hi @DDupboard ,

    Here you can find the pinout for the UP board:
    https://wiki.up-community.org/Pinout

    In the "Linux GPIO"column you will find the pin number to control via Linux command line.

    Then, just control your GPIO exporting and configuring its parameters:
    echo 26 > /sys/class/gpio/export
    cat /sys/class/gpio/gpio26/direction
    echo out > /sys/class/gpio/gpio26/direction
    cat /sys/class/gpio/gpio26/value
    echo 1 > /sys/class/gpio/gpio26/value

  • DDupboardDDupboard New Member Posts: 14

    Is there possible to reconfigure GPIO pins as a DPI in Up-board?

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    Hi @DDupboard ,

    Yes, you must to reconfigure your GPIO pins to enable your DPI.
    Check the pinout for a DPI on RPI:
    https://pinout.xyz/pinout/dpi

    The upboard pinout is equal to the RPI:
    https://wiki.up-community.org/Pinout

  • DDupboardDDupboard New Member Posts: 14

    Okay great,

    After some process, neither I installed GPIO package to board nor reconfigure GPIO pins with command you gave!

    With command : echo 26 > /sys/class/gpio/export
    Message display in normal mode : bash: /sys/class/gpio/export: Permission denied
    Message in root mode : -bash: echo: write error: Invalid argument

    What will the next steps any suggestions?

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    Hi @DDupboard ,

    You have to work as root user.
    First at all, type: sudo -i
    Then, type your command again, please.

  • DDupboardDDupboard New Member Posts: 14

    Okay, I tried in root mode mode also but still not allow to access file!

    Same issues: Permission Denied

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    Hi @DDupboard ,

    Something is wrong in your side because I just tested it and it looks fine as normal.

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    First, confirm to me you have the supported Ubuntu software installed: Ubuntu 16.04 and kernel 4.15 for UP board:
    https://wiki.up-community.org/Ubuntu

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    Then, follow the steps to access to your GPIO as normal:
    [email protected]:~$ sudo -i
    [sudo] password for upboard:
    [email protected]:~#
    [email protected]:~# echo 26 > /sys/class/gpio/export
    [email protected]:~# cat /sys/class/gpio/gpio26/direction
    in
    [email protected]:~# echo out > /sys/class/gpio/gpio26/direction
    [email protected]:~# cat /sys/class/gpio/gpio26/value
    0
    [email protected]:~# echo 1 > /sys/class/gpio/gpio26/value
    [email protected]:~# cat /sys/class/gpio/gpio26/value
    1

  • DDupboardDDupboard New Member Posts: 14


    Here I use ubuntu 16.04 version
    but still face same problem

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    Hi @DDupboard ,

    You are using a generic kernel 4.15.0-29.
    Please, follow again the instructions to get Ubuntu 16.04 and kernel 4.15 supported for UP family:

    https://wiki.up-community.org/Ubuntu#Install_Ubuntu_kernel_4.15.0_for_UP_from_PPA

    Install and reboot your machine, and try again.

  • DDupboardDDupboard New Member Posts: 14


    ERROR GOT WHEN FOLLOW STEP ON LINK


    FACE STILL SAME PROBLEM

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin
    edited February 27

    Hi @DDupboard ,

    Please, again, follow the full steps to get the kernel 4.15.0-37 in your Ubuntu 16.04.

    After downloading the kernel using the sudo apt-get install linux-image-generic-hwe-16.04-upboard, you must reboot your machine.

  • DDupboardDDupboard New Member Posts: 14

    hello,

    I check the gpio setup and change its direction but not success to get parallel RGB output!

    Can you help/guide me to change UP board GPIO to DPI format for 24bit Parallel RGB display format output?

    Cause I set all gpio as out direction but confuse for how to set LCD_HSYNC, LCD_VSYNC. CLK, DE pins ?

  • ccaldeccalde Administrator, Moderator, Emutex Posts: 266 admin

    Hi @DDupboard ,

    You must follow the next pinout tables for UP board and the DPI:
    https://wiki.up-community.org/Pinout#Pinout_Table
    https://www.raspberrypi.org/forums/viewtopic.php?t=133157

    LCD_VSYNC = I2C1_SDA - pin 3
    LCD_HSYNC = I2C1_SCL - pin 5
    CLK = ID_SD - pin 27
    DEN = ID_SC - pin 28

    Notice physical pins and Linux GPIO pins have different number codification.

  • DDupboardDDupboard New Member Posts: 14

    Hello,

    Thank you for your valuable answer!

    But, I have on doubt in gpio reconfigure like we can change either its direction (low and high) or values(0 and 1).
    Then , How can I change pin 3 status - from I2C1_SDA to LCD_VSYNC ?

    Hope for positive response!

    Thanks.

Sign In or Register to comment.