This message was posted on behalf of Intel Corporation
First, what image are you using, what mraa version are you using, what base board are you using?
How have you installed the SPI library? What do you mean some of the functions don’t work when you change lsbmode() and frequency(), does the code not compile when you use certain parameters on these functions or the program does not respond when you use certain parameters? Are you using any IDE or are you running the program straight from terminal?
Hey Sergio and xbolshe
I appreciate for your help on this problem.
what image are you using
-->I use yacto 159.devkit.
what mraa version are you using
-->The version of mraa is v0.9.0
what base board are you using?
-->I'm using the intel edison core with the arduino board.
I'm using the Intel XDK IOT version.Intel XDK - IoT App Daemon v0.0.37
The problem is if i change the oled_spi.lsbmode() from false to ture. the sequence of the transmit bit didn't change.
For example if i use oled_spi.lsbmode(true), then the sequence should be 1010 1000, if i use oled_spi.lsbmode(false), then the sequence should be 1000 1010
but the reality is the sequence didnot change after i modify the code and upload and run successfully.
I'm not sure it's because i misunderstand this function or not, since i know the first transmit bit is a key parameter for SPI interface.
For the problem of frequency, i think it's because there is a range of it. I need to do some more test on it before i can confirm where is the problem.
BTW, I had updated the mraa lib from Manage your daemon/iot devices --> update libraries on board. But still get a mraa version of v0.9.0 instead of v0.10.0 just like @xbolshe.
So what command i should run in order to update it to v0.10.0.
I'm pretty new to this, Thanks for your help.
I have checked Edison's SPI kernel driver and found that:
1. it does not support LSB setup
2. a speed has a minimum limit because of a frequency divider width. So, need to use a frequency more than 7000 Hz to see a difference
So, this is not a MRAA problem.
Regarding mraa update command, I do not use it, because I have own compiled image with preinstalled nodejs & mraa.
But you may check this forum regarding "npm install mraa". Note that need to have some tools installed before.
Thanks for clearing the confusion from my side.
Since I'm pretty new to the Yacto system, so can you tell me the location of the SPI driver in Yacto' Kernel. I tried to find out in some file folders, but failed to target it.
And i really want to dig into this, and it can helps me a lot when i debug other interfaces such as iic and usart.
here is a location:
Thanks for your help.