Can anyone help with a nrf24 question?

I know the default answer is no, stopping nrf24 and get a RF52 or nRF53 series but my question is about an existing product. We are not all FORD, we can not  just do  a mass recall on a board.  I do understand there is no support but I'm only looking for guideline, if that can not be given can anyone suggest a help forum that has an above Arduino level of knowledge. I need help from someone that understands these things because my bug is going to be sometime related to using the API.

Will try to keep this post lite at first, and gladly post what is asked for if needed.

I have developed a board with an nRF24L01+ ( no its not arduino) , it works rather well, and basic idea is it sends a command, and returns the pre set ack payload. All works well and does its job but it seems the ack reply is messed up now. 

What I saw happening here is the ack takes far too long to reply. (12ms)  Also once I receive the ack, the buffer is empty.  That just seems wrong. so I took a closer look at the flags.  It appears the ack is set and then cleared on its own.

Example

send data

check status 0x20 is low.

wait for 0x20 to be high (mean ack was received )

wait 4us

status 0x20 .is magically low now?

Because of this my logic is borken. From what I read 0x20 is only cleared when I write a 1 to it, so what cleared it?


code examples

how I wait for ACK    while (! NOP() & 0x20 ) {}

how I check for status   if ( NOP() & 0x20 )

my  NOP command.

unsigned char NOP( void )
{
    enable();
    unsigned char status=sendCommand(0xFF); //nop to see if data is ready.
    disable();    
    return status;  
}

my send command

unsigned char sendCommand(unsigned char data)
{
    SPDR = data;
    while(!(SPSR & (1<<SPIF)));    
    return SPDR;
}

Parents Reply
  • Hi Kenneth, thx for helping. Its been a long time but if I recall the IRQ pin was an optional pin. I do not use it for the design.

    As for the second, the RX_DR I thought was for packet arrival not Auto Ack?


    My confusion was on the TX_DS when using auto ack. For a short example.

    Send some data, wait for TX_DS

    My understanding is that the TX_DS bit is set high once ACK is received. I do see this occur, but shortly after that it is set low, and I do not understand why? I'd expect it to remain high until I write a 1 to it.



Children
  • The IRQ was an optional pin yes. Sorry, don't have the possibility to look into this anymore, I did update the initial reply with further information. Hope you are able to resolve this one way or the other, as you know, we have since come with a various of new nRF devices that can replace the nRF24-series. I would be happy to support you on those.

    Kenneth

Related