Skip to main content
Visitor II
February 23, 2020
Solved

How to set up IRQ pin if i just want to read the RSSI of ST25RU3993

  • February 23, 2020
  • 1 reply
  • 926 views

I posted a tread last week but it soon got buried....

So I wasn't able to get any output when probe or read from MISO using Arduino due.

and @Bart Herse​  asked me in the post have i connected my IRQ pin.

After reading the data sheet I am still not sure what to do with my IRQ signal coming out of ST25. Currently when I probe the IRQ output stays HIGH...I am using the EVAL ST25RU3993

here is my Arduino code, I just want to read RSSI information under default set up.

#include <SPI.h>
////////////////////////////////////////////
//set up pins for arudino due
//MOSI:ICSP-4
//MISO:ICSP-1
//SCK:ICSP-3
//NCS:52
//EN:2
//IRQ:22
///////////////////////////////////////////////
 
// Set up chip-select pin as NCS and enable pin as EN
const int NCS = 52;
const int EN = 2;
const int IRQ =7;
 
//SPI setting
SPISettings settingsA(100000, MSBFIRST, SPI_MODE0);
 
void setup() {
 
 pinMode (NCS, OUTPUT);
 pinMode(EN, OUTPUT);
 pinMode(IRQ, INPUT);
 digitalWrite(EN, HIGH);//set enable to high
 Serial.begin(9600);
 
 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);
 Serial.print("written");
 
 SPI.endTransaction();
}
 
 
int8_t O;
void loop() {
 //
 for (int i = 0; i <= 25500; i++) {
 
 SPI.beginTransaction(settingsA); //read from my RSSI_Display register
 digitalWrite (NCS, LOW);
 
 O = SPI.transfer16(0b0110101100000000);
 // SPI.transfer(0b0100000);
 
 digitalWrite (NCS, HIGH);
 SPI.endTransaction();
 // delay(50);
 
 }
 Serial.print(O);
}

    This topic has been closed for replies.
    Best answer by Bart Herse

    The IRQ pin notifies the MCU when events such as TX done, etc. have happened. When IRQ pin goes high the FW enters the IRS and checks the registers 0x37 and 0x38 to read out the interrupt source. Reading from these two registers will reset the IRQ pin.

    Cheers,

    B

    1 reply

    Visitor II
    February 25, 2020

    The IRQ pin notifies the MCU when events such as TX done, etc. have happened. When IRQ pin goes high the FW enters the IRS and checks the registers 0x37 and 0x38 to read out the interrupt source. Reading from these two registers will reset the IRQ pin.

    Cheers,

    B