[riot-notifications] [RIOT-OS/RIOT] drivers/nrf24l01p: Netdev driver for nrf24l01p (#13743)

benpicco notifications at github.com
Thu May 14 00:27:49 CEST 2020


@benpicco commented on this pull request.

Hmm is there anything to pay attention to when wiring these up, or are there some clones that don't work quite right?

My modules have a blob of epoxy instead of a package, maybe that's not so reassuring.

![nrf24](https://user-images.githubusercontent.com/1301112/81871957-1be81f00-9579-11ea-8b98-54ae9e2fd0f2.jpg)

When I run the `tests/driver_nrf24l01p_lowlevel` test, the `it` command will give

```
2020-05-14 00:11:19,683 # Registering nrf24l01p_rx_handler thread...
2020-05-14 00:11:19,688 # ################## Print Registers ###################
2020-05-14 00:11:19,689 # REG_CONFIG: 
2020-05-14 00:11:19,691 # 0x0 returned: 00111111
2020-05-14 00:11:19,691 # 
2020-05-14 00:11:19,692 # REG_EN_AA: 
2020-05-14 00:11:19,694 # 0x1 returned: 00000001
2020-05-14 00:11:19,695 # 
2020-05-14 00:11:19,696 # REG_EN_RXADDR: 
2020-05-14 00:11:19,698 # 0x2 returned: 00000011
2020-05-14 00:11:19,698 # 
2020-05-14 00:11:19,699 # REG_SETUP_AW: 
2020-05-14 00:11:19,701 # 0x3 returned: 00000011
2020-05-14 00:11:19,702 # 
2020-05-14 00:11:19,703 # REG_SETUP_RETR: 
2020-05-14 00:11:19,705 # 0x4 returned: 00101111
2020-05-14 00:11:19,705 # 
2020-05-14 00:11:19,706 # REG_RF_CH: 
2020-05-14 00:11:19,708 # 0x5 returned: 00000101
2020-05-14 00:11:19,708 # 
2020-05-14 00:11:19,710 # REG_RF_SETUP: 
2020-05-14 00:11:19,712 # 0x6 returned: 00100110
2020-05-14 00:11:19,712 # 
2020-05-14 00:11:19,713 # REG_STATUS: 
2020-05-14 00:11:19,715 # 0x7 returned: 00001110
2020-05-14 00:11:19,715 # 
2020-05-14 00:11:19,717 # REG_OBSERVE_TX: 
2020-05-14 00:11:19,719 # 0x8 returned: 00000000
2020-05-14 00:11:19,719 # 
2020-05-14 00:11:19,720 # REG_RPD: 
2020-05-14 00:11:19,722 # 0x9 returned: 00000000
2020-05-14 00:11:19,722 # 
2020-05-14 00:11:19,723 # REG_RX_ADDR_P0: 
2020-05-14 00:11:19,726 # 0xa returned: e7 e7 e7 e7 e7 
2020-05-14 00:11:19,726 # 
2020-05-14 00:11:19,727 # REG_TX_ADDR: 
2020-05-14 00:11:19,730 # 0x10 returned: e7 e7 e7 e7 e7 
2020-05-14 00:11:19,731 # 
2020-05-14 00:11:19,732 # REG_RX_PW_P0: 
2020-05-14 00:11:19,734 # 0x11 returned: 00100000
2020-05-14 00:11:19,734 # 
2020-05-14 00:11:19,736 # REG_FIFO_STATUS: 
2020-05-14 00:11:19,738 # 0x17 returned: 00010001
2020-05-14 00:11:19,738 # 
2020-05-14 00:11:19,739 # REG_DYNPD: 
2020-05-14 00:11:19,741 # 0x1c returned: 00000000
2020-05-14 00:11:19,742 # 
2020-05-14 00:11:19,742 # REG_FEATURE: 
2020-05-14 00:11:19,745 # 0x1d returned: 00000000
```

But `send` prints nothing - it should at least print `Sent Packet` if the `TX_DS` bit is set.

> +    luid_base(dev->urxaddr.rxaddrpx.rx_p0, aw);
+    do {
+        /* "The LSByte must be unique for all six pipes" [datasheet p.38] */
+        luid_get(&dev->urxaddr.rxaddrpx.rx_p0[aw - 1], 1);
+    } while (dev->urxaddr.rxaddrpx.rx_p0[aw - 1] == bc[aw - 1]);

```suggestion
    luid_get_lb(dev->urxaddr.rxaddrpx.rx_p0, aw);
     /* "The LSByte must be unique for all six pipes" [datasheet p.38] */
    if (dev->urxaddr.rxaddrpx.rx_p0[aw - 1] == bc[aw - 1]) {
        luid_get_lb(dev->urxaddr.rxaddrpx.rx_p0, aw);
    }
```

-- 
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/13743#pullrequestreview-411226501
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200513/5c7a72af/attachment-0001.htm>


More information about the notifications mailing list