I am developing an IEEE 802.15.4 Application on the nRF52840 using the Radio Driver (v1.8.0). I have a problem with the transmit call function. Very often in nrf_802154_transmitted_timestamp_raw(...) p_ack is NULL even when there was an ACK frame. So I check p_frame if the ACK request Bit was set and if it was I assume that we received an ACK, otherwise nrf_802154_transmit_failed(...) would have been called. The problem with this is, that I don't know if the pending bit was set in the ACK frame. In Wireshark I can see the ACK frames and that they are sent within 500us. Can you give me advice where the ACK frame could have ended and if I could access it anyways?
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void nrf_802154_transmitted_timestamp_raw(const uint8_t *p_frame, uint8_t *p_ack, int8_t power, uint8_t lqi, uint32_t time) {
if (p_ack != NULL) {
/* ACK received, check if pending bit is set */
ack = (p_ack[FRAME_PENDING_OFFSET] & FRAME_PENDING_BIT) ? IEEE802154_ACK_PENDING : IEEE802154_ACK_NO_PENDING;
nrf_802154_buffer_free_raw(p_ack);
} else {
if ((p_frame[1] & 0x20) == 0x20) {
/* the ACK frame seem to have been lost */
ack = IEEE802154_ACK_NO_PENDING;
} else {
/* no ACK requested */
ack = IEEE802154_ACK_NO;
}
}
}