nRF24L01 status values seem odd.

Hi all. I seem to be having problems getting the nRF24L01+ to work with a Pololu X2 controller. It uses the atmega644p chip. I can write to the CONFIG register and read back whatever I write to it. I can trigger the IRQ line to the processor externally so know the code works but the nRF24L01 doesn’t go low to trigger it when data arrives. I’m transmitting to the controller using one of the Nordic Serial Interface Boards from SparkFun. I can send data between two serial boards but not from serial board to the controller.

The return code from STATUS always reads 0x83. Is this normal?

Could I have the CONFIG registers set wrong? Here’s my setup:

void init_nRF24L01()

{

unsigned int config;

// Initializes pins and interrupt to communicate with the MiRF module

// Should be called in the early initializing phase at startup.

// Define CSN and CE as Output and set them to default

DDRD |= ((1<<CSN)|(1<<CE));

CE_lo;

CSN_hi;

// Initialize external interrupt on port PA0 (PCINT0)

DDRA = 0;

DDRB |= (1<<PB4);

PORTB = (1<<PB4);

PCMSK0 = (1<<PCINT0);

PCICR = (1<<PCIE0);

config_register(RF_CH, CHANNEL); // channel 2

config_register(RX_PW_P0, PAYLOAD_SIZE); // payload size = 16

config_register(CONFIG, ( (1<<MASK_RX_DR) | (1<<EN_CRC) | (0<<CRCO) )

| ( (1<<PWR_UP) | (1<<PRIM_RX) ) );

CE_hi; // goto listen mode…

}

in main()…

// the CONFIG register reads 0x0B as planned

CSN_lo;

printf("Cnfg:%X ", spi_master_transmit(R_REGISTER | CONFIG));

CSN_hi;

CSN_lo;

lcd_goto_xy(0,1);

spi_master_transmit(R_REGISTER | STATUS);

status = spi_master_transmit(NOP);

printf("%X ", status); //this always reads 0x83

CSN_hi;

The status register contents are described on page 59 of the Product Specification. 0x83 doesn’t seem right (for instance, bit 7 should be 0) but I’ve never checked it myself in my code, although I have one program that reads it. I’ll try running it under the debugger and see what I get.

I tried my test program that simply checks that I can write to the TX_ADDRESS registers and read the data back. I get 0x0E in the status register when I send the read TX_ADDRESS command (0x10), which seems to make sense as I’m not transmitting or receiving anything, and the RX FIFO is empty.

Thanks. I’ll see if I can duplicate that.