You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2023/06/26 09:47:24 UTC
[mynewt-core] branch master updated: hw/ipc_nrf5340: Apply Errata 161 workaround
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-core.git
The following commit(s) were added to refs/heads/master by this push:
new c6106c64f hw/ipc_nrf5340: Apply Errata 161 workaround
c6106c64f is described below
commit c6106c64fb9493e8aabb83abb2247ad36e3288a5
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Mon Jun 26 10:12:54 2023 +0200
hw/ipc_nrf5340: Apply Errata 161 workaround
Symptoms
Network core peripherals or CPU behave erratically after
Force-OFF release.
Conditions
Network core is in System ON IDLE state when it is entering
Force-OFF or the device enters System OFF mode.
Consequences
Network core peripherals and CPU are not reset. CPU does not
restart from the reset vector, and peripherals can behave erratically.
This adds code suggested by Nordic Errata 161 when network core reset
is released.
Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index c04d32e73..906ad31a5 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -327,7 +327,14 @@ ipc_nrf5340_init(void)
}
/* Start Network Core */
+ /* Workaround for Errata 161: "RESET: Core is not fully reset after Force-OFF" */
+ *(volatile uint32_t *) ((uint32_t)NRF_RESET + 0x618ul) = 1ul;
NRF_RESET->NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Release;
+ os_cputime_delay_usecs(5);
+ NRF_RESET->NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Hold;
+ os_cputime_delay_usecs(1);
+ NRF_RESET->NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Release;
+ *(volatile uint32_t *) ((uint32_t)NRF_RESET + 0x618ul) = 0;
/*
* Waits for NET core to start and init it's side of IPC.