4 Replies Latest reply on Jan 24, 2017 10:56 AM by C-Coder

    SPI LSB/MSB

    C-Coder

      Do the SPI controllers in Joule support changing the LSB/MSB first mode? From our testing (using Windows 10 IoT Core and the Windows.Devices.SPI namespace) we see that data bit D7 is sent first rather than D0. We would like to send D0 up to D7, then we can easily send D8 to D15 when doing 16 bits. I found this:

       

      https://iotdk.intel.com/docs/master/mraa/spi_8h.html#a141fc9a8db3e65ee3d60bf34cf53db23

       

      That implies the MRAA library for linux allows you to change the ordering (it doesn't however imply if it is a software re-ording of the data or if it is the hardware handling it). I also found this:

       

      [Edison] mraa_spi_lsbmode Does not have any affect · Issue #22 · intel-iot-devkit/mraa · GitHub

       

      That implies that in Edison, the SPI controller did not support it. So that makes us question whether or not it is supported in Joule. If it is supported in Joule, how can we use the feature when using C++/CX on Windows 10 IoT Core? If it is not currently supported, can it be added?

       

      Thanks,

       

      C-Coder

        • 1. Re: SPI LSB/MSB
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi C-Coder,
           
          Thanks for your interest in the Intel® Joule Platform.
           
          It should be supported in the Joule platform, however, it could be tested using MRAA and the function mraa_spi_lsbmode, in case it fails, you should see a message FEATURE_NOT_SUPPORTED as it is mentioned in the link you have posted regarding MRAA spi issue (last comment).
           
          Moreover, I believe that you could made a subroutine that changes the bits order before sending them, maybe it could help you to accomplish it. Also, I’d suggested you to post in the Microsoft support page (https://developer.microsoft.com/en-us/windows/iot) if they have an API to perform it, since you are using Windows.Devices.SPI namespace.
           
          Hope this information helps.
           
          Regards,
          -Yermi
           

          • 2. Re: SPI LSB/MSB
            C-Coder

            If I still had a linux image, I could test the mraa side to see if it returns FEATURE_NOT_SUPPORTED. But as I'm asking about Windows, I no longer have a linux image to test with. Regardless, this still does not answer the question of whether or not the physical hardware supports it, nor whether the Windows driver supports it. If both of those are yes, then I can go back to Microsoft and ask try to get them to enable the feature in their C++/CX library that uses the Intel driver.

             

            Thanks,

             

            C-Coder

            • 3. Re: SPI LSB/MSB
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi C-Coder,

              I have tested the mraa_spi_lsbmode in order to send the LSB first, however, I have gotten a message saying that it is unsupported and the MSB is sent first as you have mentioned previously. The message I got is this:


              So, it is not supported in the Joule board. Hope this information helps.

              Regards,
              -Yermi

              • 4. Re: SPI LSB/MSB
                C-Coder

                Yermi,

                 

                Thank you for the definitive answer.

                 

                C-Coder