In my pursuit to make a stable Gazell streaming device, I noticed some issues with pushing packets to the Tx FIFO.
Even through I get an affirmative response from the nrf_gzll_ok_to_add_packet_to_tx_fifo function, my subsequent call to nrf_gzll_add_packet_to_tx_fifo results in a failure. Is there an additional check I should be doing to ensure that I can push a packet to the Tx FIFO?
Here's the actual code:
while(nrf_gzll_ok_to_add_packet_to_tx_fifo(PipeNum) && getCount_TxBuf() > 0)
{
TxCount = this->getCount_TxBuf( );
PayloadLen_Tx = ( TxCount > NRF_GZLL_CONST_MAX_PAYLOAD_LENGTH )?NRF_GZLL_CONST_MAX_PAYLOAD_LENGTH:TxCount;
periph_pop( NRF_TxBuf, PayloadLen_Tx); // Move the Tx bytes
result = nrf_gzll_add_packet_to_tx_fifo(PipeNum, NRF_TxBuf, PayloadLen_Tx);
if(result == false){
TxErrCnt++;
}
Tx_ErrCode = nrf_gzll_get_error_code();
nrf_gzll_reset_error_code();
}