This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit d355989aa754f1b7024c1afacd772b27271fe682
Author: raiden00pl <[email protected]>
AuthorDate: Mon Oct 19 12:40:31 2026 +0200

    arch/arm/nrf52: do not acknowledge a frame with a CRC error
    
    The receive interrupt filtered the frame and sent the ACK without
    checking CRCSTATUS. A frame received with a CRC error was acknowledged
    and then dropped in the RX work, so the sender took it as delivered: an
    indirect data frame extracted with MLME-POLL was lost in about 1 of 125
    polls on channel 15. Drop it before the ACK and re-enable RX, as for a
    filtered frame. The unacknowledged indirect frame now stays pending and
    is extracted by the next poll (IEEE 802.15.4-2011 5.1.6.4.3). The Nordic
    nrf_802154 driver also sends the ACK only after CRCOK.
    
    Assisted-by: Claude Code
    Signed-off-by: raiden00pl <[email protected]>
---
 arch/arm/src/nrf52/nrf52_ieee802154_radio.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_radio.c 
b/arch/arm/src/nrf52/nrf52_ieee802154_radio.c
index 7412065b4a8..2ca5e9401d4 100644
--- a/arch/arm/src/nrf52/nrf52_ieee802154_radio.c
+++ b/arch/arm/src/nrf52/nrf52_ieee802154_radio.c
@@ -1768,11 +1768,14 @@ static void nrf52_radioi8_state_rx(struct 
nrf52_radioi8_dev_s *dev)
 {
   uint8_t *rxbuf = dev->radio->rxbuf;
 
-  /* Frame filter */
+  /* Frame filter, a frame with a CRC error is not acknowledged */
 
   if (dev->radio->state.waitack == false)
     {
-      if (!nrf52_radioi8_filter(dev))
+      if ((dev->state.rxmode != NRF52_RXMODE_NOCRC &&
+           !NRF52_RADIO_GETREG(dev->radio->lower,
+                               NRF52_RADIO_CRCSTATUS_OFFSET)) ||
+          !nrf52_radioi8_filter(dev))
         {
           nrf52_radioi8_trace_put(RADIO_TRACE_DROPFRAME, 0);
 

Reply via email to