This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How many no-read events can be stored in nRF8001 at a specific time?

Hi,

I am using nRF8001 with a MCU from PIC18F family. I have successfully configured nRF8001 to send and receive data through the nordic UART pipe (I used the app nRF UART to test it). I am using also the non-interrupt interface, i.e, I get a new event only when i call "lib_aci_event_get" function.

So since I am expecting about 200 to 300 bytes to be send by the peer through the UART PIPE (at once), I am wondering how many of these events can be stored in nRF8001 before the application controller receive them and what happens if this limit is exceeded? nRF8001 starts to drop the first (or the last) to accommodate new ones?

Regards,

  • Hi Didier,

    The size of receiving buffer on the nRF8001 is not available to the application.

    However, the nRF8001 will NACK new packet if its buffer is full (when the main MCU too busy to fetch data out). So you won't lose any packet since the central will have to retransmit the packet that get NACKed.

    [EDIT]This part was wrong:

    If the MCU continue to fail to read the RX packet out, until connection supervision timeout, the connection will be terminated.

    Agree with David, no timeout when NACKed.

  • The nRF8001, has 3 data buffers for RX , if the RX buffers are full, i.e. the application has not yet emptied it over the SPI interface, then the radio link will start NACKing so new data cannot be sent from the peer.

    I.e. no data should be lost if the application controller is slower than the radio link in getting the data out.

    Note: this will not trigger the supervision timeout in the NACK

  • Just curious, this ACK and NACK packages are sent automatically by the radio link (on a layer in which I have no control of), or it is something that i should go and implement on the application controller side? I checked the datasheet (topic 20 - Service pipes) and the ACK part is something owned by the ACI and then echoed by the radio to the peer device. Also the characteristic for RX UART is "Write without response). [EDIT] - nRF8001 is the GATT server (forgot to mention it)

  • It's on link layer, the application doesn't need to take care of it. You can read more about flow control here at section II chapter B.

Related