Arduino Due and SPI APIs

Hi,

I am using Arduino-Due (SAM3X8E) with IDE 1.8.5 and try to interface a sensor using SPI.

I read one byte of info from the sensor and its not as expected.

1)Can someone provide a complete & clear example for the Extended SPI APIs ,because I could not find one such?
I use below SPI pins
MISO - Physical pin #108
MOSI - Physical pin #109
MSCK - Physical pin #110
CS1 - Physical pin #137

2)If I use above HW pins will the classical SPI API’s will work?

For other details : Read the thread with "Arduino -Due SPI read and unexpected values "

Not sure if this is really going to help, but you did ask this specific question.

nagu3112:
1)Can someone provide a complete & clear example for the Extended SPI APIs ,because I could not find one such?

Here is the official documentation:

https://www.arduino.cc/en/Reference/DueExtendedSPI

For an example, the one library I know which used this was Ethernet (older versions). Here is a direct link to the older code.

https://github.com/arduino-libraries/Ethernet/blob/c3795e122e5c2e4d749915ed86c3d89a2e69a45f/src/utility/w5100.cpp#L147

Start on line 147 for the extended Due usage.

However, this usage is rarely useful. The ordinary way using digitalWrite for the chip select signal is usually best.

Hi,

Thanks for the input, I understand that the classical / ordinary way of SPI / read write is best.
I understand that the ordinary SPI library support below pins. Please correct if I am wrong.

MISO - Physical pin #108
MOSI - Physical pin #109
MSCK - Physical pin #110
CS1 - Physical pin #137