Skip to content

Commit d4db7f6

Browse files
silabs-BastienBhenrikbrixandersen
authored andcommitted
soc: silabs: add a config for low latency interrupt on Sliabs S2 devices
The high frequency clock was always restored before handling the interrupts to make sure that the system clock is as expected. However, the response time to interrupt when we were in EM2 was a between 300 and 600 us. By default, we use the low interrupt latency. Signed-off-by: Bastien Beauchamp <[email protected]>
1 parent 0d46a93 commit d4db7f6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

soc/silabs/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ config SOC_GECKO_PM_BACKEND_EMU
153153
help
154154
Implement PM using direct calls to EMU driver in emlib
155155

156+
config SOC_SILABS_PM_LOW_INTERRUPT_LATENCY
157+
bool "Low interrupt latency mode"
158+
default y if SOC_GECKO_PM_BACKEND_PMGR
159+
help
160+
Enabling low interrupt latency allows interrupts to be executed
161+
before the high frequency clock is restored after sleep.
162+
156163
endif # PM
157164

158165
config SOC_GECKO_EMU_DCDC

soc/silabs/common/soc_power_pmgr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ bool sl_power_manager_is_ok_to_sleep(void)
8787
return true;
8888
}
8989

90+
#if !defined(CONFIG_SOC_SILABS_PM_LOW_INTERRUPT_LATENCY)
9091
/* This function is called by sl_power_manager_sleep() right after it was woken up from WFI. */
9192
void sli_power_manager_on_wakeup(void)
9293
{
@@ -98,6 +99,7 @@ void sli_power_manager_on_wakeup(void)
9899
sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1);
99100
sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1);
100101
}
102+
#endif
101103

102104
/**
103105
* Some SiLabs blobs, such as RAIL, call directly into sl_power_manager, and

0 commit comments

Comments
 (0)