File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11# Copyright (c) 2024 Nordic Semiconductor ASA
22# SPDX-License-Identifier: Apache-2.0
33
4+ config RISCV_CORE_NORDIC_VPR_USE_MLTPAN_18
5+ bool "Apply MLTPAN workaround"
6+ default y if SOC_SERIES_NRF54HX || SOC_SERIES_NRF54LX
7+
48config RISCV_CORE_NORDIC_VPR
59 bool
610 select ATOMIC_OPERATIONS_C
Original file line number Diff line number Diff line change 66#include <zephyr/irq.h>
77#include <zephyr/sys/barrier.h>
88#include <zephyr/tracing/tracing.h>
9-
9+ #include "hal/nrf_vpr.h"
1010/*
1111 * Due to a HW issue, VPR requires MSTATUS.MIE to be enabled when entering sleep.
1212 * Otherwise it would not wake up.
@@ -17,6 +17,11 @@ void arch_cpu_idle(void)
1717 barrier_dsync_fence_full ();
1818 irq_unlock (MSTATUS_IEN );
1919 __asm__ volatile ("wfi" );
20+
21+ /* MLTPAN-18 workaround */
22+ #if defined(CONFIG_RISCV_CORE_NORDIC_VPR_USE_MLTPAN_18 )
23+ nrf_vpr_cpurun_set (NRF_VPR , true);
24+ #endif
2025}
2126
2227void arch_cpu_atomic_idle (unsigned int key )
@@ -26,6 +31,11 @@ void arch_cpu_atomic_idle(unsigned int key)
2631 irq_unlock (MSTATUS_IEN );
2732 __asm__ volatile ("wfi" );
2833
34+ /* MLTPAN-18 workaround */
35+ #if defined(CONFIG_RISCV_CORE_NORDIC_VPR_USE_MLTPAN_18 )
36+ nrf_vpr_cpurun_set (NRF_VPR , true);
37+ #endif
38+
2939 /* Disable interrupts if needed. */
3040 __asm__ volatile ("csrc mstatus, %0"
3141 :
You can’t perform that action at this time.
0 commit comments