[riot-notifications] [RIOT-OS/RIOT] drivers/kw2xrf: Use TMR3 instead TMR4 to detect ACK timeout (#12287)

benpicco notifications at github.com
Fri Sep 27 20:31:46 CEST 2019


benpicco commented on this pull request.



> -        DEBUG("[kw2xrf] TC4TMOUT, no SEQIRQ, TX failed\n");
-        assert(dev->pending_tx != 0);
-        dev->pending_tx--;
-        netdev->event_callback(netdev, NETDEV_EVENT_TX_NOACK);
-        kw2xrf_seq_timeout_off(dev);
-        kw2xrf_set_sequence(dev, dev->idle_state);
+        if (dregs[MKW2XDM_IRQSTS3] & MKW2XDM_IRQSTS3_TMR3IRQ) {
+            /* if the sequence was aborted by timer 3, ACK timed out */
+            DEBUG("[kw2xrf] TC3TMOUT, SEQIRQ, TX failed\n");
+            irqsts1 |= MKW2XDM_IRQSTS1_SEQIRQ;
+            assert(dev->pending_tx != 0);
+            dev->pending_tx--;
+            netdev->event_callback(netdev, NETDEV_EVENT_TX_NOACK);
+            kw2xrf_timer3_seq_abort_off(dev);
+            kw2xrf_abort_rx_ops_disable(dev);
+            kw2xrf_set_sequence(dev, dev->idle_state);

I guess this is not the same as `kw2xrf_set_idle_sequence()`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12287#pullrequestreview-294495200
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190927/3e652200/attachment.htm>


More information about the notifications mailing list