Skip to content

Commit

Permalink
nimble/phy/nrf5x: Update NRF5340 errata 158
Browse files Browse the repository at this point in the history
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.kasenberg@codecoup.pl>
  • Loading branch information
kasjer committed Jun 28, 2023
1 parent eead9c1 commit b457b87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nimble/drivers/nrf5x/src/ble_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand Down

0 comments on commit b457b87

Please sign in to comment.