-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nrf fromtree] soc: nrf53: Add workaround for anomaly 160 #1075
Conversation
7d0ce78
to
0cc6e9c
Compare
6257acf
to
e73203f
Compare
0cc6e9c
to
6979440
Compare
6979440
to
ca2548e
Compare
Add a DSB before doing WFE in cpu_sleep(), to ensure the memory transactions are complete. Add a note clarifying a dependency for the existing solution (dependency is satisfied by ARCH code but is good to state clearly). Relates to commit f1264b7 ("drivers: entropy: nrf5: add docs and a DSB in get_entropy_isr"). Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> (cherry picked from commit 67fa62f) Signed-off-by: Andrzej Głąbek <[email protected]>
Reuse cpu_sleep() interface consistently in Controller. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> (cherry picked from commit b46b833) Signed-off-by: Andrzej Głąbek <[email protected]>
…ic_idle() Replace the use of WFE with Zephyr kernel supplied k_cpu_atomic_idle() interface. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> (cherry picked from commit 3c0c9ac) Signed-off-by: Andrzej Głąbek <[email protected]>
…tructions Use the appropriate kernel function, i.e. `k_cpu_atomic_idle()`, instead of directly executing the WFE instruction. Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit 68bd036)
…) hook Introduce an optional hook to be called when the CPU is made idle. If needed, this hook can be used to prevent the CPU from actually entering sleep by skipping the WFE/WFI instruction. Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit 22b17e4)
Implement a workaround for the nRF53 anomaly 160. This consist of a set of writes to certain hardware registers that is done at boot and a piece of code that is executed when the CPU is made idle and that prevents the CPU from switching between active and sleep modes more than five times within a 200 us period. Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit fe3b97a)
ca2548e
to
ac7a34b
Compare
@gmarull @thst-nordic Doc building is failing on this PR with the below error. Have you seen it before/know the fix? WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. |
We should actually not be building PDF on PRs, zephyrproject-rtos/zephyr@e11d82b can be imported |
@gmarull I see. However, I fail to see if this will address the issue seen in this PR. It looks like something on the environment configuration side. I checked and it looks like all pdf docs building wrokflows, from last 12h failed. Even the "scheduled" ones (no pr). https://github.com/nrfconnect/sdk-zephyr/actions/workflows/doc-build.yml |
we should actually disable pdf build in our fork, in NCS we don't use PDF at all. |
I see e.g. this python/cpython#102134 It seems this might be related to same recent change in ubuntu? |
Cherry-pick a set of upstream commits to get the workaround for nRF53 anomaly 160 in NCS.