SPI pins

Discussion in 'UDOO NEO' started by Maurice, Nov 4, 2016.

  1. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    The docs about the SPI bus state that the Neo has the following pins for SPI:

    MOSI CLOCK SS0 SS1 SS2 SS3 Default core at boot
    ECSPI_2 20 21 38 39 - - - A9 (gpio mode)
    ECSPI_3 * * * * 21 20 - A9 (gpio mode)
    ECSPI_5 12 / 40 11 / 43 13 / 42 10 / 41 - - - M4 (digital io mode)

    The doc also states:
    ECSPI 5
    ECSPI 5 has the same pin order, function, and position as Arduino UNO. By default it is assigned to the M4 core, but configured as digital input/output (GPIO). [emphasis mine]

    Do I read it correctly that in order to use SPI on M4 it has to be configured before it can be used, and that I can choose between pins 10-12 or pins 40-42? Is SPI2, which is in the DTE the same as SPI?

    I'd like to retain pin 13 as a indicator led, as I regular use it to see if things are still running.
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    @Andrea Rovai I was thinking about creating a kind of compatible Arduino SPI library. It changed dramatically with Arduino 1.6.X. Udoo Neo's library is based on the old Arduino library so all sketches based on the new are not working.
    As a preparation I want to activate SPI but the documentation is not clear at all like @Maurice already found out.

    What are the instructions to activate SPI on the Neo?
     
  3. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Through the device tree editor you can only activate SPI 2 at the moment.
    Anyway, you are right: the documentation is not clear about enabling SPI. We're reviewing it now.
    EDIT: we've edited the docs about SPI.
     
    Last edited: Feb 7, 2017
    waltervl likes this.
  4. iMotion

    iMotion New Member

    Joined:
    Dec 27, 2019
    Messages:
    1
    Likes Received:
    0
    We're trying to use ECSPI2 from A9 and everything works fine but the MISO pin.

    Looking at UDOO Neo schematics (Rev.D), pin 20 (in theory ECSPI2_MISO) is connected to iMX6 ball B8 (RGMII2_RD3) which cannot be configured to be ECSPI2_MISO.

    SPI MISO can be enabled on ball AC7 and AB12. The first one is not available (grounded with a resistor) while the second is connected to SD4_CLK net and wired to PIN3 of the Cortex-M4 (GPIO_143).

    I think documentation is wrong...
     

Share This Page