EAPI_Test and GPIO

Discussion in 'UDOO BOLT' started by LLandre, Jun 18, 2020.

Tags:
  1. LLandre

    LLandre UDOOer

    Joined:
    Jun 18, 2020
    Messages:
    5
    Likes Received:
    1
    I need to configure pin 27 of CN25 (KSO10) as an ouput GPIO by using EAPI_Test program.
    IIUC, I need to run something like this:
    sudo ./EAPI_Test -gs 0 <param_2> <param_3> 0

    It is not clear, however, what values I have to use for <param_2> and <param_3>:
    <param_2> -> ID (see 9.1.1 in COM_EAPI_R1_0.pdf
    <param_3> -> Bitmask (see 9.1 in COM_EAPI_R1_0.pdf

    Any help would be appreciated.
    Thank you.
     
  2. Maximo

    Maximo UDOOer

    Joined:
    Aug 11, 2017
    Messages:
    18
    Likes Received:
    5
    I did some tests and found the following correlation between PIN # / FUNCTION / EAPI ID:

    upload_2020-6-24_15-55-30.png


    PIN >>> EAPI ID
    13 >>> 0
    14 >>> 5
    15 >>> 1
    16 >>> 6
    17 >>> 2
    18 >>> 7
    19 >>> 3
    20 >>> 8
    21 >>> 4
    22 >>> 9
    23 >>> 10
    24 >>> 13
    25 >>> 11
    26 >>> 14
    27 >>> 12
    28 >>> 15


    so, in your case, to set the PIN 27 to output it should be:
    Code:
    EAPI_Test -gs 0 12 1 0
    (I always use 1 for the bitmask)

    and then you change the value with:
    Code:
    EAPI_Test -gf 0 12 1 0
    EAPI_Test -gf 0 12 1 1
     

    Attached Files:

    ccs_hello likes this.
  3. LLandre

    LLandre UDOOer

    Joined:
    Jun 18, 2020
    Messages:
    5
    Likes Received:
    1
    Thank you, Maximo.
    It works perfectly. :)

     
    Maximo likes this.
  4. Maximo

    Maximo UDOOer

    Joined:
    Aug 11, 2017
    Messages:
    18
    Likes Received:
    5
    LLandre and waltervl like this.
  5. Oystein Borlaug

    Oystein Borlaug UDOOer

    Joined:
    Oct 14, 2022
    Messages:
    2
    Likes Received:
    0
    Hi, I have a problem using GPIO via the EAPI_Test program. I am following the description by Maximo. The command sudo ./EAPI_Test -gp 0 0 seems to work since it produces output. Running the command "sudo ./EAPI_Test -gs 0 0 1 1" I get "EAPI_STATUS_TIMEOUT". The reason to use sudo is to avoid permission violation. My UDOO Bolt V8 runs Ubuntu 22.04. Is it possible that I have to change something in BIOS to get it work?? Where can I find source code for the EAPI to be able to debug this software?
     
  6. Oystein Borlaug

    Oystein Borlaug UDOOer

    Joined:
    Oct 14, 2022
    Messages:
    2
    Likes Received:
    0
    Hi, problem is solved. I updated the BIOS to latest version, and it works now.
     

Share This Page