I have a couple of questions:
1. Which MRAA version are you using and which image version do you have in your board?
2. Are you checking the signal in an oscilloscope or with a logic analyzer?
3. Is the delay of 10s? And how are you testing this?
The problem could be in the log of Eclipse you could be having some delays in there related to Eclipse and not with the port itself, are you sure you are not in debug mode? Please let us know how are you testing this.
1. I am using 0.6.0 version of MRAA in Eclipse (That is the default download from Intel Website) but I have 0.6.2 MRAA on the the Edison board. The image on board is 146 build version.
2. I am checking the signal with a logic analyzer.
3. It just a rough calculation, I moved my sensor and then timed when the reading on the Eclipse console window changes.
Yeah I also thought that problem could be in Eclipse logging, I am using c/c++ perspective in Eclipse. When I ran the same code by going into Edison Console the delay was not significant (in the order of 1 second) which I am assuming is due to me printing the data on the screen at a very rapid speed (correct me if I am wrong). Do you think the SPI communication is happening at the right speed but the logging is slow, is there any other way in which I can do this?
1 of 1 people found this helpful
Yes, it could be related with this. Ten seconds is a considerable delay and in 10s you also could be losing data. The delay you are obtaining when you run the code in Terminal Console could be related to the printing data to the PC and not with the SPI bus itself.
The best way to see if there is a delay in the communication would be connecting the board to another device capable to send an acknowledge signal to the board.