If nrf_gzll_ok_to_add_packet_to_tx_fifo() returns false and nrf_gzll_get_error_code() returns nothing, what does this mean?
Facing this a lot when trying to change channels on the device.
If nrf_gzll_ok_to_add_packet_to_tx_fifo() returns false and nrf_gzll_get_error_code() returns nothing, what does this mean?
Facing this a lot when trying to change channels on the device.
I would expect that you from time to time experience that nrf_gzll_ok_to_add_packet_to_tx_fifo() return false, for instance if you are out of range or if there is much interference. Typically this means that Gazell is currently trying to transmit a packet already, and there is no available space to buffer more packets. In such case the application must either buffer the packet or discard the packet. There is no need to assert or reset the application.
/** * @brief Check if adding a packet to a pipe's TX FIFO should be successful. * * Checks if there is another space in the pipe's TX and RX FIFOs * as well as enough overall space in the packet pool. * * @param pipe The pip for which to check. This value must be < NRF_GZLL_CONST_PIPE_COUNT. * * @retval true If there is another space. * @retval false If there is not enough space, or the pipe is invalid. */ bool nrf_gzll_ok_to_add_packet_to_tx_fifo(uint32_t pipe);
I would expect that you from time to time experience that nrf_gzll_ok_to_add_packet_to_tx_fifo() return false, for instance if you are out of range or if there is much interference. Typically this means that Gazell is currently trying to transmit a packet already, and there is no available space to buffer more packets. In such case the application must either buffer the packet or discard the packet. There is no need to assert or reset the application.
/** * @brief Check if adding a packet to a pipe's TX FIFO should be successful. * * Checks if there is another space in the pipe's TX and RX FIFOs * as well as enough overall space in the packet pool. * * @param pipe The pip for which to check. This value must be < NRF_GZLL_CONST_PIPE_COUNT. * * @retval true If there is another space. * @retval false If there is not enough space, or the pipe is invalid. */ bool nrf_gzll_ok_to_add_packet_to_tx_fifo(uint32_t pipe);
This specifically happens while switching the channel table. Is there something specific that needs to be done while switching the channel table
If the host and device change table at different time, for instance if the device is waiting for an ACK, while host has changed table. Then the device will very likely experience nrf_gzll_ok_to_add_packet_to_tx_fifo() while waiting to synchronize again.
We try to make sure they do change at the same time by timing them using application timers on both sides. Changing channel tables frequently seems to mess up gazell completely. Is there a suggested way to do this?
My suggestion is that before you change channel table call: nrf_gzll_set_sync_lifetime(0);
You can change it after you have successfully sent a new packet with new channel table.
How would setting sync lifetime to 0 help in this case?