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

Why nRFGo Gazell "gzll_radio_isr_function()" need to modify timer period every time received TX_DS interrupt?

Hi,

I am study nRFGo Gazell now and I got confused on timer period change in gzll_radio_isr_function().

Per my understanding the Gazell link layer modify timer period every time Transmit Packet (TX_DS interrupt) successes.

Can someone help me to understand the purpose? will sync loss because of several times timer period modify?

// source code list on below 

//If "data sent" interrupt from radio
if(irq_flags & (1<<TX_DS))
{
  hal_nrf_clear_irq_flag(TX_DS);

  #ifndef GZLL_HOST_ONLY
  if(gzll_state_var == GZLL_DEVICE_ACTIVE)
  {
     gzll_timer_period_modified = 1;

     timer_mod_period = gzll_dyn_params[GZLL_PARAM_RX_PERIOD] - (gzll_dyn_params[GZLL_PARAM_RX_PERIOD_MODIFIER] +

                                                            ((uint16_t)((GZLL_CONST_BYTES_PR_PACKET * 2) + gzll_current_tx_payload_length) * GZLL_US_PR_BYTE));
     if(irq_flags & ((1<<RX_DR)))
       {
          timer_mod_period -= (GZLL_US_PR_BYTE * GZLL_INTERNAL_ACK_PAYLOAD_LENGTH);
        }

      gzll_set_timer_period(timer_mod_period);

Br,

Kenny Chien