Embedded Controller SPI

Discussion in 'UDOO BOLT' started by Quincy Jones, Jun 17, 2019.

  1. Quincy Jones

    Quincy Jones New Member

    Joined:
    Jun 16, 2019
    Messages:
    2
    Likes Received:
    0
    Hi,

    I am looking to preorder a UDOO Bolt from Mouser. It appears that I have to sign a purchase agreement to secure my order which is non-returnable/refundable. I will be using this inside of a robotics project and I really need to be able to access the SPI bus natively from linux(as well as the other GPIO pins) C/C++ program. I'd prefer not to have to UART to the onboard Arduino and then have that translate to SPI. Is this possible?

    Thanks!
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,224
    Likes Received:
    561
  3. Quincy Jones

    Quincy Jones New Member

    Joined:
    Jun 16, 2019
    Messages:
    2
    Likes Received:
    0
    Yes. That is always the X-factor. In theory it should work based on the hardware. Curious about those drivers of course. If this is possible there is nothing that can compete with this board from a robotics implementation perspective especially at this price range with the flexibility of speccing your own memory/storage etc. To have this much power in a board this small with CPU side accessible GPIO/SPI etc will be phenomenal.
     
  4. Fazlı Faruk Okumuş

    Fazlı Faruk Okumuş UDOOer

    Joined:
    Jun 24, 2020
    Messages:
    3
    Likes Received:
    0
    Actually ı need answers of the same question. Anybody who tried this can answer this question
     
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,224
    Likes Received:
    561
    Since the first question was asked the documentation has changed and something was added:
    You can use the SPI exposed by the EC using the EAPI libraries in your software

    Please checkout the EAPI link.
     
  6. Fazlı Faruk Okumuş

    Fazlı Faruk Okumuş UDOOer

    Joined:
    Jun 24, 2020
    Messages:
    3
    Likes Received:
    0
    Acually ı need to control about all pins. I purely use this as a kind of mcu. For example, ı will change the PWM output at 100 Hz
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,224
    Likes Received:
    561
  8. Maximo

    Maximo UDOOer

    Joined:
    Aug 11, 2017
    Messages:
    14
    Likes Received:
    4
    As waltervl said you can control most of the CN25 pins with the EAPI libraries.
    Some I think will only work using their corresponding protocol functions: SPI, I2C1, I2C2, UART0, UART1
    The ones labeled as "KEYBOARD SCAN" (pin 13 to 28) can be used as general purpose IO pins.
    I didn't test the SPI, I2C, etc, but I made some simple tests with the KEYBOARD SCAN pins on linux and was able to read/write from them using the sample app provided in the EAPI package: https://www.udoo.org/docs-bolt/BIOS_UEFI_and_Tools/EAPI.html

    What I'm not sure (because I don't have experience) is if the timing control you can have on those pins on a full operating system like Linux is better than handling them directly with a MCU.
    But having the Arduino embedded on board maybe you can mix and let it be in charge of some specific functions where a MCU might be more appropriate for the task and let the CPU give them the orders through UART.
     
    waltervl likes this.
  9. ccs_hello

    ccs_hello UDOOer

    Joined:
    Apr 15, 2017
    Messages:
    452
    Likes Received:
    168
    EC, in my view, should be used with caution. It is part of the Core system, not an optional adjunct.
    If one did something (sorry about language) stupid, he's throwing few hundred dollar to the drain.
    On the other hand, Arduino is easy to use and even it's cooked, one can still use a few dollar external Arduino to do the work.
    Besides, Arduino device IO library is feature rich, you want PWM, just use a PWM library. That's all it takes.

    On EC side, one will have to use an external circuit, e.g., an I2C--PWM to do the work.
    I would also caution check first if there are already system devices on its SPI or I2C buses.
    (UART1 and UART2 are mapped to Core x86/AMD64's OS' Com1 and Com2 ports anyway.)

    P.S., I'd rather see Arduino related questions use a separate thread. This one is just for EC's external IO interface.
     
    waltervl likes this.

Share This Page