How to reconfigure of GPIO pins of UP board?

DDupboard
DDupboard New Member Posts: 15

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

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    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

  • DDupboard
    DDupboard New Member Posts: 15

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

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    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

  • DDupboard
    DDupboard New Member Posts: 15

    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?

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @DDupboard ,

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

  • DDupboard
    DDupboard New Member Posts: 15

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

    Same issues: Permission Denied

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @DDupboard ,

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

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    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

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

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

  • DDupboard
    DDupboard New Member Posts: 15


    Here I use ubuntu 16.04 version
    but still face same problem

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    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.

  • DDupboard
    DDupboard New Member Posts: 15


    ERROR GOT WHEN FOLLOW STEP ON LINK


    FACE STILL SAME PROBLEM

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭
    edited February 2019

    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.

  • DDupboard
    DDupboard New Member Posts: 15

    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 ?

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    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.

  • DDupboard
    DDupboard New Member Posts: 15

    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.

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @DDupboard ,

    What do you mean??
    The LCD_VSYNC is the DPI pin who should be connected to the I2C1_SDA UP board pin. They are pins from each board, end to end.

  • DDupboard
    DDupboard New Member Posts: 15

    Thank you for answer.

    Here, I2C1_SDA also work as LCD_VSYNC but when I prefer Intel Atom z8000 processor datasheet(UP board also use this processor) and see it GPIO function where I cannot find DPI mode!

    And according to you I2C1_SDA work as LCD_VSYNC and I also try this pin as dpi mode and connect according it but not get any result.

    Guide for further way!

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @DDupboard ,

    Unfortunately, UP board has never been validated for that kind of DPI interfaces.

    I2C1_SDA doesn't work as LCD_VSYNC. I told you must connect the I2C1_SDA pin from your UP board to the LCD_VSYNC pin from the LCD display and in the same way for the rest of the pins.

    You should be able to access to your display via I2C communication as it is suggested in that forum:
    https://www.raspberrypi.org/forums/viewtopic.php?t=133157

  • aivision
    aivision New Member Posts: 12

    Hi @DDupboard,

    I am on a similar project and I need to implement DPI in the UP Board. I would like to know if you finally make it work. Thank you!

Privacy Policy