rymanluk closed pull request #788: nimble/dtm: Disable whitening for testing
URL: https://github.com/apache/mynewt-core/pull/788
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/drivers/nimble/nrf52/src/ble_phy.c 
b/hw/drivers/nimble/nrf52/src/ble_phy.c
index 671463d42..053d80f8f 100644
--- a/hw/drivers/nimble/nrf52/src/ble_phy.c
+++ b/hw/drivers/nimble/nrf52/src/ble_phy.c
@@ -1800,7 +1800,9 @@ ble_phy_resolv_list_disable(void)
 #if MYNEWT_VAL(BLE_LL_DIRECT_TEST_MODE) == 1
 void ble_phy_enable_dtm(void)
 {
-    /* Disable whitening as per Bluetooth v5.0 Vol 6. Part F. 4.1.1*/
+    /* When DTM is enabled we need to disable whitening as per
+     * Bluetooth v5.0 Vol 6. Part F. 4.1.1
+     */
     NRF_RADIO->PCNF1 &= ~RADIO_PCNF1_WHITEEN_Msk;
 }
 
diff --git a/net/nimble/controller/src/ble_ll_dtm.c 
b/net/nimble/controller/src/ble_ll_dtm.c
index 76336137f..7937d01a8 100644
--- a/net/nimble/controller/src/ble_ll_dtm.c
+++ b/net/nimble/controller/src/ble_ll_dtm.c
@@ -298,6 +298,8 @@ ble_ll_dtm_tx_create_ctx(uint8_t packet_payload, uint8_t 
len,
     rc = ble_ll_sched_dtm(sch);
     assert(rc == 0);
 
+    ble_phy_enable_dtm();
+
     g_ble_ll_dtm_ctx.active = 1;
     return 0;
 }
@@ -336,6 +338,8 @@ ble_ll_dtm_rx_create_ctx(uint8_t rf_channel, uint8_t 
phy_mode)
         return 1;
     }
 
+    ble_phy_enable_dtm();
+
     return 0;
 }
 
@@ -352,6 +356,7 @@ ble_ll_dtm_ctx_free(struct dtm_ctx * ctx)
     OS_EXIT_CRITICAL(sr);
 
     ble_phy_disable();
+    ble_phy_disable_dtm();
     ble_ll_state_set(BLE_LL_STATE_STANDBY);
 #ifdef BLE_XCVR_RFCLK
     ble_ll_xcvr_rfclk_stop();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to