cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino Due doesn't read ST25 EVAL Board

XChen.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Bart Herse
Senior II

Hello XChen,

so your intention is to control the ST25RU3993-EVAL board with a different controller. Have you modified the EVAL board in order to disconnect the existing MCU?

Are you aware that there is an open source SDK available which allows to build your application upon a known to work code.

There is little point in reinventing the wheel.

Check : https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/st25-development-tools/stsw-st25ru-sdk.html

Cheers,

B

View solution in original post

4 REPLIES 4
Bart Herse
Senior II

Hi XChen.1,

have you connected the IRQ line as well?

Cheers,

B

Hi Bart,

No I have not. I am not very sure what the IRQ line suppose to do.

Cheers,

Chen

in fact, when i probed my IRQ, it stays high..... i am able to read some bits from miso when I turned the clock down but that's pretty much it. the LED lights are quite dimm comparing to when i operate the device with the PC GUI via USB

Bart Herse
Senior II

Hello XChen,

so your intention is to control the ST25RU3993-EVAL board with a different controller. Have you modified the EVAL board in order to disconnect the existing MCU?

Are you aware that there is an open source SDK available which allows to build your application upon a known to work code.

There is little point in reinventing the wheel.

Check : https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/st25-development-tools/stsw-st25ru-sdk.html

Cheers,

B