SPI not working

Discussion in 'Troubleshooting' started by Oromit, Mar 14, 2014.

  1. Oromit

    Oromit New Member

    Joined:
    Mar 14, 2014
    Messages:
    8
    Likes Received:
    0
    Hi,

    I'm trying to get SPI to work, but even though i enabled CONFIG_SPI_SPIDEV and verified it's active the spi devices don't show up.
    I remuxed some pins for spi and would like to use them via spidev.

    I'm using an Udoo Quad board.
     
  2. Oromit

    Oromit New Member

    Joined:
    Mar 14, 2014
    Messages:
    8
    Likes Received:
    0
    I was able to get the spidev devices to appear with the following changes, and of course muxing the ecspi pins:

    https://github.com/BtbN/Kernel_Unico/co ... ...6c57401

    I'm not entirely sure if my Chipselect GPIO is correct, though. Do i have to mux the ECSPIx_SSx to the pin, or the corrosponding GPIO, and set it to GPIO mode output high/low?
     
  3. Oromit

    Oromit New Member

    Joined:
    Mar 14, 2014
    Messages:
    8
    Likes Received:
    0
    Ok, it works fine now at least for SPI1, the Chipselect needs to be muxed to GPIO. Haven't tested SPI2 and 5 yet, but they should also work.

    These are the changes needed:

    https://github.com/BtbN/Kernel_Unico/co ... ...8d9f843

    For the muxing the pin has to be muxed to GPIO, but the GPIO_MODE still has to be removed from the in/out arrays.
     
  4. filipxsikora

    filipxsikora New Member

    Joined:
    Feb 11, 2015
    Messages:
    5
    Likes Received:
    0
    Hi Oromit,
    have you been able to made the SPI's working ? I followed your steps, changed my kernel source files like you do, set CONFIG_SPI_SPIDEV=y in UDOO_defconfig, recompiled kernel and replace old kernel with new. After reboot, SPI devices appeared under /dev/spidevX.0, so I tried write something to them by "# echo Hello > /dev/spidev0.0" (tried other spidevs with same result), I've connected signals to oscilloscope, and I saw SCLK ticking, however no data on MOSI (I also checked MISO, but no data was there either). Did your SPI worked normally after you did that ? Was there data present on MOSI ? Or did I forgot about something ?
    Thanks for your help in advance.
    Best regards,
    Filip
     
  5. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Hi there Oromit,
    we have to give it a try actually, but there is no ETA at the moment. Please be patient, and sorry for the inconvenience.
     

Share This Page