Nordic nRF24L01 RX problem - SOLVED (stray capacitance??)

Hello All,

I’ve managed to get an SPI interface with this chip up & running & can successfully read all the registers.

What I can’t manage to do however is get the IRQ pin to go low (i.e. indicate received packet). I’ve tried disabling the CRC, AA on pipe 0 & checked to config & status register to check everything is as it should be.

Does anybody have any ideas please?

Leo

Are you able to get the TX_DS interrupt to go active when you send a packet? That’s the first step to getting a link, since you can’t receive something you didn’t send. :wink:

Brennen,

I think I’ve got at least the Tx to work. I was using your functions (converted in C18) & intialised the module with:

nrf24l01_initialize(0b00001111,						//config				00
				 		true,							//opt_rx_active_mode	
				 		nrf24l01_EN_AA_DEFAULT_VAL,		//en_aa					01
				 		nrf24l01_EN_RXADDR_DEFAULT_VAL,	//en_rxaddr				02 
				 		nrf24l01_SETUP_AW_DEFAULT_VAL,	//setup_aw				03
				 		nrf24l01_SETUP_RETR_DEFAULT_VAL,//setup_retr			04
				 		nrf24l01_RF_CH_DEFAULT_VAL,		//rf_ch					05
				 		nrf24l01_RF_SETUP_DEFAULT_VAL,	//rf_setup				06
				 		NULL,							//*rx_addr_p0			0A
				 	 	NULL,							//*rx_addr_p1			0B
				 		nrf24l01_RX_ADDR_P2_DEFAULT_VAL,//rx_addr_p2			0C
				 		nrf24l01_RX_ADDR_P3_DEFAULT_VAL,//rx_addr_p3			0D
				 		nrf24l01_RX_ADDR_P4_DEFAULT_VAL,//rx_addr_p4			0E
				 		nrf24l01_RX_ADDR_P5_DEFAULT_VAL,//rx_addr_p5			0F
				 		NULL,							//*tx_addr				10
				 		nrf24l01_RX_PW_P0_DEFAULT_VAL,	//rx_pw_p0				11
				 		nrf24l01_RX_PW_P1_DEFAULT_VAL,	//rx_pw_p1				12
						nrf24l01_RX_PW_P2_DEFAULT_VAL,	//rx_pw_p2				13
						nrf24l01_RX_PW_P3_DEFAULT_VAL,	//rx_pw_p3				14
						nrf24l01_RX_PW_P4_DEFAULT_VAL,	//rx_pw_p4				15
						nrf24l01_RX_PW_P5_DEFAULT_VAL);	//rx_pw_p5				16

& then tried to send with :

nrf24l01_write_tx_payload((void*)‘Test’, 4, true);

However from what I understand this function doesn’t automatically place the module into TX mode (config register).

Is this correct?

Leo

The last argument in nrf24l01_write_tx_payload() is a bool that, if true, automatically sends the packet (your code will send the packet).

In the code you showed, you had the statement ```
nrf24l01_write_tx_payload((void*)‘Test’, 4, true);


If this compiled, I'd be very surprised. I'm guessing you just typed it out instead of copying it, but it should look more like this (note the double quotes instead of single):```
nrf24l01_write_tx_payload((unsigned char *)"Test", 4, true); 

Keep in mind that the length of the payload that you’re sending (4 in the above example) has to match the length that the RX is expecting (unless you have dynamic payload lengths turned on, which my code does not).

Thanks for the reply. A combination of finger trouble and lack of coffee!

I managed to get the chip transmitting but found that during testing I had

  1. Set PRIM_RX to 0 prior to issuing the nrf24l01_write_tx_payload(…) command

  2. I had to disable ENAA_P0 (obvious enough as I’d no receiver to acknowledge the transmission)

I now get an LED flashing when checking:

if(nrf24l01_irq_pin_active() && nrf24l01_irq_tx_ds_active())
	LED1_IO ^= 1;

On the receiver side I’ve similarily:

cleared ENAA_P0,

cleared MASK_RX_DR,

set PRIM_RX,

set PWR_UP

& set CE

However the IRQ RX_DR pin is not being cleared.

Any ideas how to check what’s going on?

Hello All,

It may be of some help to others but I managed to get this sorted. I had two units, one TX on a breadboard & a RX hooked up to a PICDEM2 Plus board.

When I moved the RX to a breadboard it magically started working (the SPI interface had been working all along) so I can only imagine that it was some stray capacitance on the CSN or CE lines not allowing clean transitions.

Leo