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.
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.
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).
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.