This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push: new 326fb77c nimble/phy/nrf5x: Update NRF5340 errata 158 326fb77c is described below commit 326fb77c0fe278011879872ea74c89fdec75e66e Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> AuthorDate: Wed Jun 28 11:40:12 2023 +0200 nimble/phy/nrf5x: Update NRF5340 errata 158 Errata specifies only NRF_RADIO registers that should be copied from FICR, code copied all registers from TRIMCNF. Now only NRF_RADIO registers are copied as part of Errata 158 implementation. Signed-off-by: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> --- nimble/drivers/nrf5x/src/ble_phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nimble/drivers/nrf5x/src/ble_phy.c b/nimble/drivers/nrf5x/src/ble_phy.c index 84d2ff5e..3ba359c8 100644 --- a/nimble/drivers/nrf5x/src/ble_phy.c +++ b/nimble/drivers/nrf5x/src/ble_phy.c @@ -1571,7 +1571,9 @@ ble_phy_init(void) /* Errata 158: load trim values after toggling power */ for (uint32_t index = 0; index < 32ul && NRF_FICR_NS->TRIMCNF[index].ADDR != (uint32_t *)0xFFFFFFFFul; index++) { - *((volatile uint32_t *)NRF_FICR_NS->TRIMCNF[index].ADDR) = NRF_FICR_NS->TRIMCNF[index].DATA; + if (((uint32_t)NRF_FICR_NS->TRIMCNF[index].ADDR & 0xFFFFF000ul) == (volatile uint32_t)NRF_RADIO_NS) { + *((volatile uint32_t *)NRF_FICR_NS->TRIMCNF[index].ADDR) = NRF_FICR_NS->TRIMCNF[index].DATA; + } } *(volatile uint32_t *)(NRF_RADIO_NS_BASE + 0x774) =