From fbd97a198310732682924e1626d4a7dce3d7f60e Mon Sep 17 00:00:00 2001 From: Martin Hoff Date: Mon, 10 Feb 2025 16:31:59 +0100 Subject: [PATCH] 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 --- soc/silabs/silabs_s2/Kconfig.defconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/soc/silabs/silabs_s2/Kconfig.defconfig b/soc/silabs/silabs_s2/Kconfig.defconfig index d7dec5deb3d..9bea631fe79 100644 --- a/soc/silabs/silabs_s2/Kconfig.defconfig +++ b/soc/silabs/silabs_s2/Kconfig.defconfig @@ -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