drivers: ieee802154: nrf5: Fix DRX_ADJUST workaround

This PR introduces a fix for DRX window being triggered to early during
CSL. Fixes were also introduced in the nrf 802154 radio
driver, so removed the unneeded DRX_ADJUST constant.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
This commit is contained in:
Artur Hadasz 2022-04-27 15:49:07 +02:00 committed by Carles Cufí
commit 2094bfa183
2 changed files with 4 additions and 9 deletions

View file

@ -62,11 +62,6 @@ static struct nrf5_802154_data nrf5_data;
#define DRX_SLOT_PH 0 /* Placeholder delayed reception window ID */
#define DRX_SLOT_RX 1 /* Actual delayed reception window ID */
#define PH_DURATION 10 /* Duration of the placeholder window, in microseconds */
/* When scheduling the actual delayed reception window an adjustment of
* 800 us is required to match the CSL transmission timing for unknown
* reasons. This is a temporary workaround until the root cause is found.
*/
#define DRX_ADJUST 800
#if defined(CONFIG_IEEE802154_NRF5_UICR_EUI64_ENABLE)
#if defined(CONFIG_SOC_NRF5340_CPUAPP)
@ -833,7 +828,7 @@ static void nrf5_config_csl_period(uint16_t period)
static void nrf5_schedule_rx(uint8_t channel, uint32_t start, uint32_t duration)
{
nrf5_receive_at(start - DRX_ADJUST, duration, channel, DRX_SLOT_RX);
nrf5_receive_at(start, duration, channel, DRX_SLOT_RX);
/* The placeholder reception window is rescheduled for the next period */
nrf_802154_receive_at_cancel(DRX_SLOT_PH);
@ -978,7 +973,7 @@ void nrf_802154_received_timestamp_raw(uint8_t *data, int8_t power, uint8_t lqi,
nrf5_data.rx_frames[i].lqi = lqi;
#if IS_ENABLED(CONFIG_NET_PKT_TIMESTAMP)
nrf5_data.rx_frames[i].time = nrf_802154_first_symbol_timestamp_get(time, data[0]);
nrf5_data.rx_frames[i].time = nrf_802154_mhr_timestamp_get(time, data[0]);
#endif
if (data[ACK_REQUEST_BYTE] & ACK_REQUEST_BIT) {
@ -1066,7 +1061,7 @@ void nrf_802154_transmitted_raw(uint8_t *frame,
#if IS_ENABLED(CONFIG_NET_PKT_TIMESTAMP)
nrf5_data.ack_frame.time =
nrf_802154_first_symbol_timestamp_get(
nrf_802154_mhr_timestamp_get(
metadata->data.transmitted.time, nrf5_data.ack_frame.psdu[0]);
#endif
}

View file

@ -86,7 +86,7 @@ manifest:
groups:
- hal
- name: hal_nordic
revision: a85bb3676d61d1ae202088e0d3fec556056b2c9e
revision: d9e50d7287fc381792f6f2ee6d37093e036fbd10
path: modules/hal/nordic
groups:
- hal