I have been trying different speeds, all to no avail.
It's not a shield you can buy. This is an in-house developed board that speaks standard SPI Mode0, and I can successfully program it via SPI from an FT232H USB dongle.
MRAA version: Version: v0.7.3-27-g0ad7536
I feel your pain. And a lot of other people do too. I started this tread about the same thing: Has *ANYONE* been able to get SPI bus working on Edison + Arduino board?
It seems that SPI with mraa does not work at all. It will work if you code it using the Arduino compiler.
If you look at the logic analyzer output you posted, the CS line goes high at the positive edge of the 8 clock cycle. In Logic1.jpg, it does that in the second byte sent, and in Logic2.jpg, it does it in the first byte sent.
I don't have a logic analyzer, so I would be curious to see that analyzer output if you run the same code having used the Arduino compiler instead of C/C++.
It's becoming increasingly clear that Edison is not ready for prime time. It's just not fully baked yet. It may get there someday, but the code support, the libraries, and the documentation are just not quite to alpha-level yet. Even the pinouts are a pain. Try hooking a logic analyzer to the mini breakout board for SPI and you'll see what I mean. :-)
Sadly, I think it's time to pack it in on Edison until Intel gets its act together a bit more so it is fully functional. Without basic things like SPI working, it's just not possible to do much.
Yup! I couldn't agree more. I was really psyched for the Edison. Small, powerful, easy to use. But as it is, it's more of a headache.
Unfortunately, coding my app with using Arduino, it is slow enough that it is not even worth it. Performance (using Arduino code) to price ration makes the Edison a huge loser in the list of MCUs for my purposes. Price wise, I'm better off with a tiny version of the Arduino.
Thank you for letting us know about your results and the issue with SPI. We are aware of this issue and we are working on a fix.
I have probably already been on enough SPI threads so I won't say too much here.
I also stopped doing much with the Edison for awhile as I was frustrated with things like SPI... So I started using the Raspberry PI 2 on the Trossen Robotics HR-OS1 project as that was the second option they ship with. Actually for this project SPI is not used so this is not a stopper issue. After playing with the RPI2, I ran into issues with the USB/FTDI code talking to the servo controller (Arbotix Pro) which uses an FTDI chip for USB, so I swapped the Edison back in... So far the USB appears to be happier on the Edison. Oops sorry a little off topic.
As for SPI, I have noticed several commits up on the Edison Linux github: https://github.com/01org/edison-linux/commits/edison-3.10.17
That have to do with SPI, including things like DMA and the like. As I mentioned in another thread, I wish that either there was a documented set of steps for us to use to build an image based on what is up on github and/or some place where you upload an image based on what is up there. Preferably before you do an official release. i.e something like what the Arduino group does with their nightly builds, or what PJRC (Teensy) does where he will release beta releases of a new release, such that hopefully the user community will find any new major regressions before the release is official.
Any updates on getting SPI to function on the Edison??