[riot-notifications] [RIOT-OS/RIOT] cpu/nrf52/radio: initial support for nrf52's ieee802.15.4 radio (#10268)

Koen Zandberg notifications at github.com
Mon Mar 4 15:47:24 CET 2019


bergzand commented on this pull request.



> +                        (RADIO_PCNF0_CRCINC_Include << RADIO_PCNF0_CRCINC_Pos));
+    NRF_RADIO->PCNF1 = IEEE802154_FRAME_LEN_MAX;
+    /* set start frame delimiter */
+    NRF_RADIO->SFD = IEEE802154_SFD;
+    /* set MHR filters */
+    NRF_RADIO->MHRMATCHCONF = 0;              /* Search Pattern Configuration */
+    NRF_RADIO->MHRMATCHMAS = 0xff0007ff;      /* Pattern mask */
+    /* configure CRC conform to IEEE802154 */
+    NRF_RADIO->CRCCNF = ((RADIO_CRCCNF_LEN_Two << RADIO_CRCCNF_LEN_Pos) |
+                         (RADIO_CRCCNF_SKIPADDR_Ieee802154 << RADIO_CRCCNF_SKIPADDR_Pos));
+    NRF_RADIO->CRCPOLY = 0x011021;
+    NRF_RADIO->CRCINIT = 0;
+
+    /* assign default addresses */
+    luid_get(nrf802154_dev.short_addr, IEEE802154_SHORT_ADDRESS_LEN);
+    luid_get(nrf802154_dev.long_addr, IEEE802154_LONG_ADDRESS_LEN);

Minor nit: Other drivers request a single `IEEE802154_LONG_ADDRESS_LEN` luid and reuse part of it to set the `IEEE802154_SHORT_ADDRESS`, see [here](https://github.com/RIOT-OS/RIOT/blob/master/drivers/at86rf2xx/at86rf2xx.c#L74) and [here](https://github.com/RIOT-OS/RIOT/blob/master/drivers/mrf24j40/mrf24j40.c#L57). Not blocking on this, only want to point it out that this diverges from other drivers.

-- 
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/10268#pullrequestreview-210176549
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190304/894622de/attachment.html>


More information about the notifications mailing list