Skip to content

Commit 7b8458f

Browse files
maje-embnordicjm
authored andcommitted
esb: add timer clear after receiving ACK
After receiving an ACK packet, the timer is now stopped and cleared. This change adds timer cleanup for the DPPI configuration. For the PPI configuration, the SHUTDOWN task is used. Ref: NCSDK-36149 Signed-off-by: Marcin Jelinski <[email protected]>
1 parent 22fe9df commit 7b8458f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subsys/esb/esb_dppi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ void esb_ppi_for_wait_for_ack_set(void)
142142

143143
nrf_timer_subscribe_set(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_STOP,
144144
radio_address_timer_stop);
145+
nrf_timer_subscribe_set(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_CLEAR,
146+
radio_address_timer_stop);
145147

146148
nrf_radio_subscribe_set(NRF_RADIO, NRF_RADIO_TASK_DISABLE, timer_compare0_radio_disable);
147149

@@ -164,6 +166,7 @@ void esb_ppi_for_wait_for_ack_clear(void)
164166
nrf_timer_publish_clear(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_EVENT_COMPARE0);
165167

166168
nrf_timer_subscribe_clear(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_STOP);
169+
nrf_timer_subscribe_clear(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_CLEAR);
167170

168171
nrf_radio_subscribe_clear(NRF_RADIO, NRF_RADIO_TASK_DISABLE);
169172
}

0 commit comments

Comments
 (0)