nrf53: fix RTC pretick power usage for events on RTC0

For RTC0 events the RTC1 pretick event was not cleared what caused the
WDT to be not stopped. This resulted in increased power usage.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
This commit is contained in:
Andrzej Kuros 2023-10-06 08:41:49 +02:00 committed by Carles Cufí
parent 1c2d326579
commit c4e53dabf7

View file

@ -410,6 +410,8 @@ static void rtc_pretick_rtc_isr_hook(void)
{
NRF_IPC->PUBLISH_RECEIVE[CONFIG_SOC_NRF53_RTC_PRETICK_IPC_CH_TO_NET] &=
~IPC_PUBLISH_RECEIVE_EN_Msk;
nrf_rtc_event_clear(NRF_RTC1, NRF_RTC_CHANNEL_EVENT_ADDR(RTC1_PRETICK_CC_CHAN));
}
void rtc_pretick_rtc0_isr_hook(void)
@ -420,10 +422,6 @@ void rtc_pretick_rtc0_isr_hook(void)
void rtc_pretick_rtc1_isr_hook(void)
{
rtc_pretick_rtc_isr_hook();
if (IS_ENABLED(CONFIG_SOC_NRF53_RTC_PRETICK)) {
nrf_rtc_event_clear(NRF_RTC1, NRF_RTC_CHANNEL_EVENT_ADDR(RTC1_PRETICK_CC_CHAN));
}
}
static int rtc_pretick_cpunet_init(void)