You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/01/26 21:26:05 UTC
[mynewt-nimble] branch master updated (390744d -> 8051721)
This is an automated email from the ASF dual-hosted git repository.
andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git.
from 390744d transport: Bridge build workaround
new a47a011 nimble/phy/nrf53: Fix clearing debug pins
new 8051721 nimble/phy/nrf53: Add workaround for anomaly 117
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
nimble/drivers/nrf5340/src/ble_phy.c | 50 +++++++++++++++++-------------------
1 file changed, 23 insertions(+), 27 deletions(-)
[mynewt-nimble] 02/02: nimble/phy/nrf53: Add workaround for anomaly 117
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 8051721553ef24deefee57774cdd563552c70a92
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Jan 26 17:45:32 2022 +0100
nimble/phy/nrf53: Add workaround for anomaly 117
---
nimble/drivers/nrf5340/src/ble_phy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/nimble/drivers/nrf5340/src/ble_phy.c b/nimble/drivers/nrf5340/src/ble_phy.c
index 53daab5..2b21afb 100644
--- a/nimble/drivers/nrf5340/src/ble_phy.c
+++ b/nimble/drivers/nrf5340/src/ble_phy.c
@@ -326,21 +326,25 @@ ble_phy_mode_apply(uint8_t phy_mode)
switch (phy_mode) {
case BLE_PHY_MODE_1M:
NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_1Mbit;
+ *((volatile uint32_t *)0x41008588) = *((volatile uint32_t *)0x01FF0080);
NRF_RADIO_NS->PCNF0 = NRF_PCNF0_1M;
break;
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_2M_PHY)
case BLE_PHY_MODE_2M:
NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_2Mbit;
+ *((volatile uint32_t *)0x41008588) = *((volatile uint32_t *)0x01FF0084);
NRF_RADIO_NS->PCNF0 = NRF_PCNF0_2M;
break;
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
case BLE_PHY_MODE_CODED_125KBPS:
NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_LR125Kbit;
+ *((volatile uint32_t *)0x41008588) = *((volatile uint32_t *)0x01FF0080);
NRF_RADIO_NS->PCNF0 = NRF_PCNF0_CODED;
break;
case BLE_PHY_MODE_CODED_500KBPS:
NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_LR500Kbit;
+ *((volatile uint32_t *)0x41008588) = *((volatile uint32_t *)0x01FF0080);
NRF_RADIO_NS->PCNF0 = NRF_PCNF0_CODED;
break;
#endif
[mynewt-nimble] 01/02: nimble/phy/nrf53: Fix clearing debug pins
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit a47a0112439e32fab6304c3e0eb6814dae864a59
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Jan 19 10:29:51 2022 +0100
nimble/phy/nrf53: Fix clearing debug pins
Pins controlled by GPIOTE can be only cleared by GPIOTE...
---
nimble/drivers/nrf5340/src/ble_phy.c | 46 +++++++++++++++---------------------
1 file changed, 19 insertions(+), 27 deletions(-)
diff --git a/nimble/drivers/nrf5340/src/ble_phy.c b/nimble/drivers/nrf5340/src/ble_phy.c
index 12be202..53daab5 100644
--- a/nimble/drivers/nrf5340/src/ble_phy.c
+++ b/nimble/drivers/nrf5340/src/ble_phy.c
@@ -298,6 +298,16 @@ struct nrf_ccm_data {
static struct nrf_ccm_data nrf_ccm_data;
#endif
+#if MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN) >= 0
+static uint8_t phy_dbg_txrxen_ready_idx;
+#endif
+#if MYNEWT_VAL(BLE_PHY_DBG_TIME_ADDRESS_END_PIN) >= 0
+static uint8_t phy_dbg_address_end_idx;
+#endif
+#if MYNEWT_VAL(BLE_PHY_DBG_TIME_WFR_PIN) >= 0
+static uint8_t phy_dbg_wfr_idx;
+#endif
+
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
uint32_t
@@ -1249,7 +1259,8 @@ ble_phy_dbg_time_setup(void)
*/
#if MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN) >= 0
- ble_phy_dbg_time_setup_gpiote(--gpiote_idx,
+ phy_dbg_txrxen_ready_idx = --gpiote_idx;
+ ble_phy_dbg_time_setup_gpiote(gpiote_idx,
MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN));
NRF_GPIOTE_NS->SUBSCRIBE_SET[gpiote_idx] = DPPI_SUBSCRIBE_GPIOTE_TASKS_SET_TXRXEN;
@@ -1262,7 +1273,8 @@ ble_phy_dbg_time_setup(void)
#endif
#if MYNEWT_VAL(BLE_PHY_DBG_TIME_ADDRESS_END_PIN) >= 0
- ble_phy_dbg_time_setup_gpiote(--gpiote_idx,
+ phy_dbg_address_end_idx = --gpiote_idx;
+ ble_phy_dbg_time_setup_gpiote(gpiote_idx,
MYNEWT_VAL(BLE_PHY_DBG_TIME_ADDRESS_END_PIN));
NRF_GPIOTE_NS->SUBSCRIBE_SET[gpiote_idx] = DPPI_SUBSCRIBE_GPIOTE_TASKS_SET_ADDRESS;
@@ -1270,7 +1282,8 @@ ble_phy_dbg_time_setup(void)
#endif
#if MYNEWT_VAL(BLE_PHY_DBG_TIME_WFR_PIN) >= 0
- ble_phy_dbg_time_setup_gpiote(--gpiote_idx,
+ phy_dbg_wfr_idx = --gpiote_idx;
+ ble_phy_dbg_time_setup_gpiote(gpiote_idx,
MYNEWT_VAL(BLE_PHY_DBG_TIME_WFR_PIN));
NRF_GPIOTE_NS->SUBSCRIBE_SET[gpiote_idx] = DPPI_SUBSCRIBE_GPIOTE_TASKS_SET_RXREADY;
@@ -1844,35 +1857,14 @@ ble_phy_restart_rx(void)
static void
ble_phy_dbg_clear_pins(void)
{
-#if MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN) >= 0 || \
- MYNEWT_VAL(BLE_PHY_DBG_TIME_ADDRESS_END_PIN) >= 0 || \
- MYNEWT_VAL(BLE_PHY_DBG_TIME_WFR_PIN) >= 0
- NRF_GPIO_Type *port;
- int pin;
-
#if MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN) >= 0
- pin = MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN);
- port = pin > 31 ? NRF_P1_NS : NRF_P0_NS;
- pin &= 0x1f;
-
- port->OUTCLR = (1 << pin);
+ NRF_GPIOTE_NS->TASKS_CLR[phy_dbg_txrxen_ready_idx] = 1;
#endif
-
#if MYNEWT_VAL(BLE_PHY_DBG_TIME_ADDRESS_END_PIN) >= 0
- pin = MYNEWT_VAL(BLE_PHY_DBG_TIME_ADDRESS_END_PIN);
- port = pin > 31 ? NRF_P1_NS : NRF_P0_NS;
- pin &= 0x1f;
-
- port->OUTCLR = (1 << pin);
+ NRF_GPIOTE_NS->TASKS_CLR[phy_dbg_address_end_idx] = 1;
#endif
-
#if MYNEWT_VAL(BLE_PHY_DBG_TIME_WFR_PIN) >= 0
- pin = MYNEWT_VAL(BLE_PHY_DBG_TIME_WFR_PIN);
- port = pin > 31 ? NRF_P1_NS : NRF_P0_NS;
- pin &= 0x1f;
-
- port->OUTCLR = (1 << pin);
-#endif
+ NRF_GPIOTE_NS->TASKS_CLR[phy_dbg_wfr_idx] = 1;
#endif
}