soc: silabs: silabs_s2: Activate Zero Latency IRQ with level 2

silabs_s2 uses simplicity_sdk hal library, which already have by default
a zero latency IRQs mechanism with a hardcoded value. In order to be
aligned with simplicity_sdk, we need to activate Zero Latency IRQ in
Zephyr by default. The level (2) depends on the hardcoded
value in simplicity_sdk (CORE_ATOMIC_BASE_PRIORITY_LEVEL). Without this
fix, if you use an IRQ with a priority of 0 or 1, irq_lock() and
irq_unlock() have no effect for this IRQ.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit is contained in:
Martin Hoff 2025-02-10 16:31:59 +01:00 committed by Benjamin Cabé
commit fbd97a1983

View file

@ -18,4 +18,17 @@ config SILABS_SLEEPTIMER_TIMER
config CORTEX_M_SYSTICK
default n if SILABS_SLEEPTIMER_TIMER || GECKO_BURTC_TIMER
# silabs_s2 uses simplicity_sdk hal library, which already have by default a zero latency
# IRQs mechanism with a hardcoded value. In order to be aligned with simplicity_sdk, we
# need to activate Zero Latency IRQ in Zephyr by default. The level (2) depends on the
# hardcoded value in simplicity_sdk (CORE_ATOMIC_BASE_PRIORITY_LEVEL). Without this config,
# if you use an IRQ with a priority of 0 or 1, irq_lock() and irq_unlock() have no effect
# over this IRQ.
config ZERO_LATENCY_IRQS
default y
config ZERO_LATENCY_LEVELS
default 2
endif