We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

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.



  • Is it possible to use spi-gpio-custom in Python? I don't see this in the list of packages on opkg, does this mean I'll have to compile it for Omega?



  • @Jeremy-Shubert To answer my own question...you create a new software based SPI device using insmod spi-gpio-custom, then you can access this device on the bus you created with the standard Python module, just point it to the newly created device. I haven't been able to get the CLK and data signals working but the CS triggers using this method



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