Skip to content

Commit

Permalink
Bluetooth: Controller: Fix end time capture be on radio event end
Browse files Browse the repository at this point in the history
Fix end time capture be on radio event end irrespective of
direction finding support. Let the timer clear use radio
end or radio phy end, for no direction finding or direction
finding support, respectively.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak authored and kartben committed Feb 28, 2025
1 parent f67a94f commit 23d321d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ void radio_switch_complete_and_phy_end_b2b_tx(uint8_t phy_curr, uint8_t flags_cu
uint8_t phy_next, uint8_t flags_next)
{
#if defined(CONFIG_BT_CTLR_TIFS_HW)
NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Msk | RADIO_SHORTS_END_DISABLE_Msk |
NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Msk | NRF_RADIO_SHORTS_TRX_END_DISABLE_Msk |
RADIO_SHORTS_DISABLED_TXEN_Msk;
#else /* !CONFIG_BT_CTLR_TIFS_HW */
NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Msk | NRF_RADIO_SHORTS_TRX_END_DISABLE_Msk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ static inline void hal_radio_disable_on_hcto_ppi_config(void)
*/
static inline void hal_radio_end_time_capture_ppi_config(void)
{
nrf_radio_publish_set(NRF_RADIO, HAL_NRF_RADIO_EVENT_END, HAL_RADIO_END_TIME_CAPTURE_PPI);
nrf_radio_publish_set(NRF_RADIO, HAL_NRF_RADIO_EVENT_END,
HAL_RADIO_END_TIME_CAPTURE_PPI);
nrf_timer_subscribe_set(EVENT_TIMER, HAL_EVENT_TIMER_TRX_END_TASK,
HAL_RADIO_END_TIME_CAPTURE_PPI);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static inline void hal_radio_end_time_capture_ppi_config(void)
nrf_ppi_channel_endpoint_setup(
NRF_PPI,
HAL_RADIO_END_TIME_CAPTURE_PPI,
(uint32_t)&(NRF_RADIO->HAL_RADIO_TRX_EVENTS_END),
(uint32_t)&(NRF_RADIO->HAL_RADIO_EVENTS_END),
(uint32_t)&(EVENT_TIMER->TASKS_CAPTURE[HAL_EVENT_TIMER_TRX_END_CC_OFFSET]));
}

Expand Down

0 comments on commit 23d321d

Please sign in to comment.