Skip to content

Commit

Permalink
[nrf fromlist] nrf53: fix RTC pretick power usage for events on RTC0
Browse files Browse the repository at this point in the history
For RTC0 events the RTC1 pretick event was not cleared what caused the
WDT to be not stopped. This resulted in increased power usage.

Upstream PR: zephyrproject-rtos/zephyr#63597

Signed-off-by: Andrzej Kuroś <[email protected]>
  • Loading branch information
ankuns authored and rlubos committed Oct 9, 2023
1 parent c7f3aaa commit 6b30e02
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions soc/arm/nordic_nrf/nrf53/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 6b30e02

Please sign in to comment.