Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9873 Discussions

SPI connection Galileo- Arduino

gk91
Novice
1,241 Views

Hi folks...

I have connected Intel Galileo gen1 and Arduino uno in SPI communication as Galileo as a Master device and Arduino as a Slave device .Now, I want to transfer my sensor (IR distance sensor) values with current stamps from slave( Arduino) to Mastar (Galileo)device continueously. In parallel to that I want to get acknowledgement from master to slave. I am using MRAA 0 .9.0. library.

in Galileo and writing in C++ by using putty serial terminal.

Any help would be appreciated.

1 Solution
Diego_V_Intel
Employee
154 Views

Hello gopal1096,

First I recommend you to check the MRAA documentation and the C/C++ API where you will find a description of the functions for SPI:

You won't be able to send an acknowledgement in parallel because SPI is a serial protocol. This means that you will have to send the acknowledgment once the Master has received the data from the Slave. It would interrupt the data transmission just for a moment while the acknowledgment is received by the Slave.

The process of sending data should be something like the following:

  1. Master requests data from Slave.
  2. Slave receives the request.
  3. Slave starts sending data.
  4. Master receives the data from Slave.
  5. Master sends an acknowledgment after checking the data received.
  6. Slave receives the acknowledgment.
  7. Slave starts sending data again and the process is repeated.

You will find in the links above all the information required to write the script. Basically you have to use the transfer method to transfer data between Master and Slave.

Regards,

Diego.

View solution in original post

1 Reply
Diego_V_Intel
Employee
155 Views

Hello gopal1096,

First I recommend you to check the MRAA documentation and the C/C++ API where you will find a description of the functions for SPI:

You won't be able to send an acknowledgement in parallel because SPI is a serial protocol. This means that you will have to send the acknowledgment once the Master has received the data from the Slave. It would interrupt the data transmission just for a moment while the acknowledgment is received by the Slave.

The process of sending data should be something like the following:

  1. Master requests data from Slave.
  2. Slave receives the request.
  3. Slave starts sending data.
  4. Master receives the data from Slave.
  5. Master sends an acknowledgment after checking the data received.
  6. Slave receives the acknowledgment.
  7. Slave starts sending data again and the process is repeated.

You will find in the links above all the information required to write the script. Basically you have to use the transfer method to transfer data between Master and Slave.

Regards,

Diego.

Reply