-
Notifications
You must be signed in to change notification settings - Fork 623
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
v2.4 YOPAN-165 and YOPAN-168 #1958
v2.4 YOPAN-165 and YOPAN-168 #1958
Conversation
Introduce a new API for barrier operations starting with a general skeleton and the implementation for barrier_data_memory_fence_full(). Select a built-in or an arch-based implementation according to new Kconfig symbols CONFIG_BARRIER_OPERATIONS_BUILTIN and CONFIG_BARRIER_OPERATIONS_ARCH. The built-in implementation falls back on the compiler built-in function using __ATOMIC_SEQ_CST as it is done for the atomic APIs already. Signed-off-by: Carlo Caione <ccaione@baylibre.com> (cherry picked from commit 74a942e)
a39cd10
to
c7cf54c
Compare
547cc00
to
eb28481
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some fromlists should be fromtrees as they’re already merged
eb28481
to
d82c0ef
Compare
Fixed, there are now |
Some cherry-picks contain two lines for "cherry picked from", should only be one |
…prepare() hook Introduce an optional hook to be called when the CPU is made idle. If needed, this hook can be used to prepare data for upcoming call to z_arm_on_enter_cpu_idle(). The main difference is that z_arm_on_enter_cpu_idle_prepare() hook is called before interrupts are disabled. Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no> (cherry picked from commit 3d89d58)
Add RTC pretick option that triggers HW activity one tick before and RTC event that leads to the interrupt. Option is active only on nrf53 network core. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no> (cherry picked from commit 31eaffd)
…st one CC The nrf53 pretick can be used with non-zero `NRF_RTC_TIMER_USER_CHAN_COUNT` Kconfig option. The nrf53 pretick requires just one RTC1 CC channel. The nrf53 pretick handles also RTC1 and RTC0 both CCs and OVERFLOW events by examination of events scheduled on them. The pretick is set based on number of ticks to the closest event scheduled that can trigger an interrupt. Because the operation in `z_arm_on_enter_cpu_idle` hook would take too much time with interrupts disabled, the `z_arm_on_enter_cpu_idle_prepare` hook enabled by Kconfig option `ARM_ON_ENTER_CPU_IDLE_PREPARE_HOOK` is used. It performs RTC0 and RTC1 examination, and sets pretick without interrupts being blocked. The LDREX/STREX are leveraged to detect if exception took place between start of `z_arm_on_enter_cpu_idle_prepare` and `z_arm_on_enter_cpu_idle`. If exception has not been taken, the pretick calculation can be trusted because source data could not changed and too much time could not pass. Otherwise the sleep attempt is disallowed, the idle will loop again and try later. Prompt for `SOC_NRF53_RTC_PRETICK` Kconfig option allows to control this option by an user and turn the feature off if necessary. Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no> (cherry picked from commit e03d5d4)
The `SOC_NRF53_RTC_PRETICK` option is now allowed to be used with `NRF_802154_RADIO_DRIVER`. Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no> (cherry picked from commit d44e96e)
…nterrupts It might happen that while some interrupt handler other than for RTC0 or RTC1 (e.g. for RADIO) is executed, the scheduled pretick CC triggers. This starts pretick pulses due to the loop through IPC. The change in pretick schedule did not stop the pretick pulses going through IPC loop, what caused heavy increase in power consumption. This commit fixes this behavior. Added also clarifications for Kconfig option `SOC_NRF53_RTC_PRETICK`. Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no> (cherry picked from commit fe1202d)
Coupling in code between workarounds for anomaly 160 and anomaly 165 (pretick) is decreased. Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no> (cherry picked from commit 1d4a51c)
The cherry-picked workaround against nRF53 anomaly 165, the "pretick" is based on nrfx 3.0.0. The added code introduces missing definitions to the soc.c file which are missing in nrfx 2.11.0. Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
…ly 168 Use the already available in the tree mechanism of adding assembly instructions right after WFI/WFE to implement the workaround for nRF5340 anomaly 168 (replace the 4 NOP solution used on the network core as it turned out to be insufficient) and provide two related Kconfig options so that users are able to adjust the workaround to their actual needs (disable it entirely or use it in the extended version). Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no> (cherry picked from commit 23e15c4)
fd7f713
to
7300d9e
Compare
fixed |
The function `z_nrf_rtc_timer_exact_set` is added to allow setting compare channel without possible creeping of cc val. Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no> (cherry picked from commit a6615ac)
7300d9e
to
0ad2a2a
Compare
With GCC 12.3 and binutils 2.40, the build fails with: <...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S: Assembler messages: <...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S:51: Error: junk at end of line, first unrecognized character is `n' <...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S:133: Info: macro invoked from here Because the SOC_ON_EXIT_CPU_IDLE macro puts all the statements on a single line, there must be a semicolon after .rept Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com> (cherry picked from commit 37352d3)
7d3d1ed
to
40681cf
Compare
This PR brings in workaround against anomaly 165 and 168 for the nRF5430 SoC.
KRKNWK-19361