Omega2+ SPI full-duplex communication



  • Hello and good morning,
    I am developing an IoT project for my diploma (engineering exam here in Poland). So far so good, I've already completed the designs and so forth, but after three days of analyzing and head-banging I found out that the SoC probably has a silicon failure manufactured in, that prevents the full-duplex SPI transmission to occur.

    I know there is the FAQ post already, but my project features those small nRF24L01 modules and without the SPI communication, I need to take a huge step back and recreate my whole "base" part. I attach a photo of my custom extension board I've designed for my IoT project. :)
    0_1544799659502_IMG_6952.jpg

    I'm a bit disappointed that nobody ever mentioned this issue on the product specification nor at the MediaTek SoC datasheet. Are all of the onion omega2 (plus or non) affected and MediaTek didn't fix the issue? What about the new Omega2 Pro's and Omega2S?

    What could I do, to provide a full-duplex communication for the radio module even with the SoC issue? (It needs to be low level; preferable in C).

    Thanks in advance for all responses.

    Best regards,
    Tomasz



  • Hi @TomiCode

    Very nice board ;-)

    As a workaround, you could use software SPI instead of hardware SPI. Unfortunately you'd need to re-route the SPI connections to different pins, as the hardware SPI pins can't be switched to GPIO because SPI is needed for accessing the flash. For SW SPI just load the spi-gpio-custom module for example like:

      # bus<Y>=<devid>,<SCK>,<MOSI>,<MISO>,<mode>,<speedInHz>,<CS>
      insmod spi-gpio-custom bus0=1,1,2,3,0,100000,0
    

    After this, you have a 100kHz SPI bus at /dev/spidev1.0 using GPIO0..3 for CS/SCK/MOSI/MISO in that order. For the mode parameter, see spi.h. I'm using this in several Omega2 based projects successfully.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.