[Oberon] FPGA - nRF24L01 `RPI Net' server

Tomas Kral thomas.kral at email.cz
Fri Apr 27 10:29:06 CEST 2018


Toying with `RPI Net server'.

I can so far `semi-reliably' exchange single payload packets, only.
When I try to exchange packets of multiple payloads, this is where
things get interesting, as I have to try many times to push the whole
packet through.

Often `RPI' receives packets of bogus length bigger than 512, this is
guarded by if-else,
if ( (rx.hd.len <= MAX_PAYLOAD) && ..)
else /* discard packet */

But even when discarded, still some parts of packet (headers)
remain in the FIFO, that seems confusing next packet retransmission,
leaving incorrect data in payloads.

Even if try FLUSH_TX/RX to clear the FIFO
queue, still communication is not reliable, especially when I try
to send different messages, single payload followed by multiple
payload ones.

I realised NRF makes use of a FIFO, it keeps on queue the last three
payloads. My understanding is that when FIFO is full, no other
payloads can be written to. So one end must wait a little until the
other reads out data to empty FIFO. This is possibly the trick of using
some timing loops in the code. I needed to adjust some from 50ms to
5ms, to catch the transmission on RPI at all.

Also I am not sure what happens, when automatic `ACK' is not received
after all retries exhausted, or worst is missed. Is the payload with bad
`CRC' or otherwise uncertain data freed from FIFO?

After reading some more of the NRF specs, reading the code, I am not at
all sure my understanding is correct.

Many thanks.

Tomas Kral <thomas.kral at email.cz>

More information about the Oberon mailing list