Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,401 Views

Error initializing SPI bus

Hi I'm having trouble initializing the SPI bus on the intel joule. I followed the solution described in question and I have the most updated version of mraa, but I am still getting the "Error initializing SPI bus" error message.

my interactive python result is as follows

--------------------------------------------------------

>>> mraa.getVersion()

'v1.5.1'

>>> mraa.Spi(0)

Traceback (most recent call last):

File "", line 1, in

File "/usr/lib/python2.7/dist-packages/mraa.py", line 1515, in __init__

this = _mraa.new_Spi(*args)

ValueError: Error initialising SPI bus

------------------------------------------------------

I also get this same error when running the Iot-devkit git hub at https://github.com/intel-iot-devkit/mraa/blob/master/examples/python/spi.py mraa/spi.py at master · intel-iot-devkit/mraa · GitHub

I also read this discussion /thread/109040?q=Error%20initialising%20SPI%20bus https://communities.intel.com/thread/109040?q=Error%20initialising%20SPI%20bus and this does not solve my issue either. I can get GPIO pins to work fine using sudo, but the SPI bus will not initialize regardless if sudo is used or not.

thank you

0 Kudos
3 Replies
idata
Community Manager
83 Views

Hi kantr1ej,

Thanks for your interest in the Intel® Joule™ Platform.

Unfortunately, the Ubuntu OS is out of the scope of our support. If you check this thread , you will see that the SPI works on the Ostro OS, but on Ubuntu it hasn't been confirmed.

I would encourage you to visit the https://developer.ubuntu.com/core/get-started/intel-joule Intel Joule | Developer , maybe they will be able to provide you further assistance.

Best Regards,

 

-Jose P.
FGold
New Contributor II
83 Views

Jose P.,

did not see where Kantr1ej referenced Ubuntu in his question. Excuse my comment if I am incorrect.

Kantr1ej, if this is for UBUNTU:

there is a mechanism to use/assign the SPI-GPIO pins (insmod spi-gpio.ko bus0=32765, ...) and then access Ubuntu SPI Gpio driver with mraa SPI API calls. It is extremely slow (around 6.7KB/sec), but does appear to work.

idata
Community Manager
83 Views

Hi guys,

Thanks for your interest in the Intel® Joule™ Platform.

First, floydg thanks for sharing this information, it will be useful for other users having issues with the SPI on Ubuntu.

Finally, regarding my assumption that kantr1ej is using Ubuntu, since kantr1ej was following this thread /thread/109040?q=Error%20initialising%20SPI%20bus https://communities.intel.com/thread/109040?q=Error%20initialising%20SPI%20bus that is specifically about using the SPI with mraa on Ubuntu. I can conclude that his OS is Ubuntu, if it isn't case I apologize for the assumption.

Please kantr1ej, feel free to contact us if you are using the Ostro OS and will be happy to help you with your SPI issue.

Have a nice day!

Best Regards,

 

-Jose P.
Reply