NRF24L01+ IRQ Issue

avrinterruptsnrf24l01spi

I am testing the functionality of NRF24L01+ and for my purposes I have configured it as PTX, No Auto ACK.

I am able to communicate with the chip just fine and able to configure all the registers (confirmed with a logic analyzer).

However when I try to send data, the IRQ pin never goes low.

below is the configuration I used for NRF24L01+

_delay_ms(1000);    //allow radio to stabilize after power on

uint8_t val[5];

val[0]=0x00;        //disable AA(auto acknowledgements)
RADIO_READWRITE(W, EN_AA, val, 1);

val[0]=0x01;        //number of enabled pipes. enable only daya pipe0
RADIO_READWRITE(W, EN_RXADDR, val, 1);

val[0]=0x03;        //ADDRESS width setup. 5 bytes
RADIO_READWRITE(W, SETUP_AW, val, 1);

val[0]=0x01;        //RF channel setup. 2401 Mhz
RADIO_READWRITE(W, RF_CH, val, 1);

val[0] = 0x07;      //RF setup. 0DB max power. 1 mbps max range
RADIO_READWRITE(W, RF_SETUP, val, 1);

val[0] = 0x12;      //Tx RF_ADDRESS setup. address of the PRX device
val[1] = 0x12; 
val[2] = 0x12; 
val[3] = 0x12; 
val[4] = 0x12; 
RADIO_READWRITE(W, TX_ADDR, val, 5);

val[0]=0x01;        //payload width setup. 1 bytes
RADIO_READWRITE(W, RX_PW_P0, val, 1);

val[0]=0x0E;        // Config register. PTX + POWER UP + 2BYTE CRC
RADIO_READWRITE(W, CONFIG, val, 1);

_delay_ms(100); //give radio time to reach STANDBY mode (CE=low);

Any idea why the IRQ pin is not going low?

UPDATE:

I checked using polling as well (bit 5 on STATUS register) using the command

while((RADIO_GETSTATUS()&(1<<5))==0){}
PORTB |= (1<<PB0);

and the LED does not light up. So it seems that the packets are not being transmitted. Could my configuration to the NRF24L01+ be wrong?

On probing with logic analyzer,I get this

enter image description here

after the toggle on CE line to TX the payload, I am continuously polling the status register (0x07) and continuously getting 0x0E

Best Answer

Solved. The issue was that the NRF24L01+ was getting reset during TX (due to power supply spike i think). Adding a 1uf cap between 3.3v and GND solved the issue.

Related Topic