nimble/phy: Fix CRC configuration

The SKIPADDR field has allowed values 0, 1 and 2 - for unknown reason
it works even if set to 3 as we do, but better have this configured
properly.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/01308580
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/01308580
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/01308580

Branch: refs/heads/bluetooth5
Commit: 01308580e7f673b38fdcfbb8642c223cfce36910
Parents: c91bd6c
Author: Andrzej Kaczmarek <[email protected]>
Authored: Mon May 15 17:21:45 2017 +0200
Committer: Andrzej Kaczmarek <[email protected]>
Committed: Wed May 17 11:56:17 2017 +0200

----------------------------------------------------------------------
 hw/drivers/nimble/nrf52/src/ble_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/01308580/hw/drivers/nimble/nrf52/src/ble_phy.c
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/nrf52/src/ble_phy.c 
b/hw/drivers/nimble/nrf52/src/ble_phy.c
index 0947975..773d8fb 100644
--- a/hw/drivers/nimble/nrf52/src/ble_phy.c
+++ b/hw/drivers/nimble/nrf52/src/ble_phy.c
@@ -985,7 +985,7 @@ ble_phy_init(void)
     NRF_RADIO->PREFIX0 = (BLE_ACCESS_ADDR_ADV >> 24) & 0xFF;
 
     /* Configure the CRC registers */
-    NRF_RADIO->CRCCNF = RADIO_CRCCNF_SKIPADDR_Msk | RADIO_CRCCNF_LEN_Three;
+    NRF_RADIO->CRCCNF = (RADIO_CRCCNF_SKIPADDR_Skip << 
RADIO_CRCCNF_SKIPADDR_Pos) | RADIO_CRCCNF_LEN_Three;
 
     /* Configure BLE poly */
     NRF_RADIO->CRCPOLY = 0x0100065B;

Reply via email to