I am seeing some very strange behavior when using an ANT channel with the sd_ant_acknowledge_message_tx call to guarantee message deliveries between a master and slave.
The behavior I have implemented on both the master and slave is as follows:
If event->eventCode == EVENT_TRANSFER_TX_COMPLETED send a new message.
else if event->eventCode == EVENT_TRANSFER_TX_FAILED resend the same message.
This setup mostly works fine, however whenever a slave receives an EVENT_RX_FAIL, the master may receive a message other than the last message sent to the softdevice.
I have attempted to clear the pending transfer on the EVENT_RX_FAIL event, but this does not stop incorrect messages from being sent.
Has anyone had any experience with this type of error before? Any help would be appreciated.