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

how to config the parameter of GZP_TX_RX_TRANS_DELAY?

i am useing nRF51822 pairing with nRF24lu1 over GZLL protocol now, is there someone have the experience on how to config the parameter of GZP_TX_RX_TRANS_DELAY in function gzp_tick_sleep_rx_periods(GZP_TX_RX_TRANS_DELAY);

For Example why is the GZP_TX_RX_TRANS_DELAY parameter set to 10 – this line of code causes a 20msec delay

below is the nRF51822 side code:

static gzp_tx_rx_trans_result_t gzp_tx_rx_transaction(const uint8_t *tx_packet, uint8_t tx_length, uint8_t *rx_dst, uint32_t *rx_length, uint8_t pipe) { ... nrf_gzp_flush_rx_fifo(pipe);

retval = GZP_TX_RX_FAILED_TO_SEND;

(void)nrf_gzll_disable();
while(nrf_gzll_is_enabled())
{}
temp_lifetime = nrf_gzll_get_sync_lifetime();
(void)nrf_gzll_set_sync_lifetime(GZP_TX_RX_TRANS_DELAY * 3); // 3 = RXPERIOD * 2 + margin
(void)nrf_gzll_enable();
    
tx_packet_success = gzp_tx_packet(tx_packet, tx_length, pipe);

if(tx_packet_success)
{
    retval = GZP_TX_RX_NO_RESPONSE;

    nrf_gzp_flush_rx_fifo(pipe);

    fetch_packet[0] = (uint8_t)GZP_CMD_FETCH_RESP;

    ***gzp_tick_sleep_rx_periods(GZP_TX_RX_TRANS_DELAY);***
    
    tx_packet_success = gzp_tx_packet(fetch_packet,GZP_CMD_FETCH_RESP_PAYLOAD_LENGTH, pipe);

    if(tx_packet_success)
    {
        if(nrf_gzll_get_rx_fifo_packet_count(pipe))
        {

        }
    }

}


(void)nrf_gzll_disable();
while(nrf_gzll_is_enabled())
{}
(void)nrf_gzll_set_sync_lifetime(temp_lifetime);
(void)nrf_gzll_enable();

return retval;

}

Related