From 292ca93795598e02210bc8c2114ed46db5ea4cc0 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Fri, 22 Sep 2023 14:00:44 +0200 Subject: [PATCH] Bluetooth controller nrf: nrf52 bsim radio hal fix hal_radio_tx_chain_delay_ns_get() was incorrectly returning the microsecond value, resulting in a 1us error in the timing => Fix it. Signed-off-by: Alberto Escolar Piedras --- .../ll_sw/nordic/hal/nrf5/radio/radio_sim_nrf52.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_sim_nrf52.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_sim_nrf52.h index 3d53462326a..1b8c1583547 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_sim_nrf52.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_sim_nrf52.h @@ -14,7 +14,10 @@ /* NRF Radio HW timing constants * - provided in US and NS (for higher granularity) - * - based on empirical measurements and sniffer logs + * - based on the timings configured in the HW models, which are based + * on the product specification + * - Note that this timings are approx. the same as in the real HW, + * but tend to be rounded to the nearest microsecond */ /* TXEN->TXIDLE + TXIDLE->TX (with fast Radio ramp-up mode) @@ -361,7 +364,7 @@ static inline uint32_t hal_radio_tx_chain_delay_ns_get(uint8_t phy, uint8_t flag ARG_UNUSED(phy); ARG_UNUSED(flags); - return HAL_RADIO_NRF52833_TX_CHAIN_DELAY_US; + return HAL_RADIO_NRF52833_TX_CHAIN_DELAY_NS; } static inline uint32_t hal_radio_rx_chain_delay_ns_get(uint8_t phy, uint8_t flags)