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

Gazell: why i can only fill 4 pipes

Hi,

I want to init all 8 pipes in the host device (gazell protocoll) with a single init byte. Thats important because i want to send that init byte to the devices with the first ack-signal.

The problem is that i always got an error after the fourth fill, that looks like that:

Pipe:0   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF
Pipe:1   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF
Pipe:2   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF
Pipe:3   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF
Pipe:4   Data:1   Push_ok:0   TX:0   RX:0    Errorcode:8  Enable:FF
Pipe:5   Data:1   Push_ok:0   TX:0   RX:0    Errorcode:8  Enable:FF
Pipe:6   Data:1   Push_ok:0   TX:0   RX:0    Errorcode:8  Enable:FF
Pipe:7   Data:1   Push_ok:0   TX:0   RX:0    Errorcode:8  Enable:FF

When i just init the pipes 4-7 erverything is fine:

Pipe:4   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF
Pipe:5   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF
Pipe:6   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF
Pipe:7   Data:1   Push_ok:1   TX:1   RX:0    Errorcode:0  Enable:FF

All pipes are enabled but after the fourth fill i always got the error 8 which means:

NRF_GZLL_ERROR_CODE_INSUFFICIENT_PACKETS_AVAILABLE      =  8,
///< There are insufficient packets in the Gazell memory pool to 
///< successfully execute the operation.

So i had a look at this: devzone.nordicsemi.com/.../a00140.html and found this section:

When the Host is handling packets on multiple pipes, care needs to be taken to ensure that ACK payloads in the TX FIFOs on pipes that are no longer in use, are not taking up space in the memory pool and consequently blocking communication on other pipes. To avoid such congestion, the application on the Host can flush the TX FIFOs on the pipes no longer in use.

Isn't ist possible to init all 8 pipes with just a single byte (i thougth the TX FiFo has a 3 Bytes memory).

Thank you for your help.

  • Hi,

    It seems like you're preloading an ACK payload on your host to all RF pipes. The problem is that the FIFO has a restriction of 3 payloads (3 in TX and 3 in RX), regardless of the length of it.

    So, if you upload 3 payloads in the TX FIFO, the fourth one should fail. I am a bit surprised that you are able to upload a fourth one successfully.

    What you can do in a ACK-payload scenario is that your device sends two payloads

    • First payload is a dummy payload so that the host can prepare it.
    • Second payload is sent to fetch the ACK payload

    Cheers, Håkon

  • Hi,

    Thank you for your answer.

    Are you sure when you read this devzone.nordicsemi.com/.../a00140.html in the FiFo section:

    All 8 pipes on both the Device and the Host have two First-in First-out (FIFO) buffers that can hold packets. Each pipe has a TX FIFO and an RX FIFO. The total number of packets in the FIFOs is 6, while every individual TX or RX FIFO (8 pipes x 2 = 16 in total) can store 3 packets.

    Each pipe has a TX and RX FiFo and in every TX FiFo is just one payload (with 1Byte).

  • The documentation section regarding the FIFO is very confusing, which I will take up with the developer and report internally.

    When it comes to the number of packets allocated in both RX and TX FIFO, the maximum is 6. For each pipe, the maximum is 3 payloads. This means that you can hold 3 payloads in the RX FIFO and 3 in the TX FIFO at one time. Exceeding this limit will produce error code NRF_GZLL_ERROR_CODE_INSUFFICIENT_PACKETS_AVAILABLE.

  • Hi, thanks again.

    but we repeat each other, that doesn't match/fit do my first question. I only want to have one TX byte in each pipe, so that the device has just to send once per cycle and get the byte in the ACK-Payload, why is that a problem and i can fill only four TX FiFos?

  • By having one byte loaded into each RF pipe, you are then trying to preload 8 payloads. You are only allowed to preload 3 payloads before the TX buffer is filled up, regardless of the length of these payloads. You must always check to see if there is space in the FIFO before you upload the payload, using function "nrf_gzll_ok_to_add_packet_to_tx_fifo"

Related