Arduino Due doesn't read ST25 EVAL Board
Any one who has successfully drive the eval board with Arduino via spi?
I am trying to drive the ST25RU3993 Eval board using SPI, with my Arduino Due (i read an earlier post on that ran at different voltage and solve using 3V arduino board, in my case both devices run on 3.3V) to prototype a quick project. I use the oscilloscope and it seems my spi outputs (sclk, mosi, chipselect, enable) are looking good. However my ST25 board is not responding any useful feedback.
Any clue?
my wire up is as follow: MISO to MISO, MOSI to MOSI, SCLK to SCLK , pin 2 to EN, pin 52 to NCS.
here is my Arduino code:
#include <SPI.h>
////////////////////////////////////////////
//set up pins for arudino due
//MOSI:ICSP-4
//MISO:ICSP-1
//SCK:ICSP-3
//NCS:52
//en:2
//
///////////////////////////////////////////////
const int NCS = 52;
// set up the speed, data order and data mode
SPISettings settingsA(5000000, MSBFIRST, SPI_MODE1);
void setup() {
pinMode (NCS, OUTPUT);
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
Serial.begin(9600);
delay(100);
runonce(); // wirte my register only once
}
void runonce() {
SPI.begin();
SPI.beginTransaction(settingsA); //I wrote to the following 2 main control registers, register description is at the data sheet
digitalWrite (NCS, LOW);
SPI.transfer(0b00000000); // write and register addressL: Device staus register
SPI.transfer(0b00000001); // value for this register: Turn RF-On
digitalWrite (NCS, HIGH);
digitalWrite (NCS, LOW);
SPI.transfer(0b00000001); // write and register addressL: Protocal Selection Register
SPI.transfer(0b00000000); // value for this register: Choose EPC Gen2
digitalWrite (NCS, HIGH);
SPI.endTransaction();
Serial.print("written");
}
int8_t Q ;
void loop() {
for (int i = 0; i <= 5000; i++) {
digitalWrite (NCS, LOW);
Q = SPI.transfer(0b101011); // RSSI Display register
digitalWrite (NCS, HIGH);
}
Serial.print(Q); // see it at serial monitor
}.the arduino serial monitor just outputs 75s with or without any tags. not sure if I am missing something above....:unamused_face:
here is the datasheet: https://www.st.com/resource/en/datasheet/st25ru3993.pdf