Skip to content

Commit da762fc

Browse files
ArekBalysNordicnordicjm
authored andcommitted
modules: openthread: Fix OpenThread CSL Accuracy
The current accuracy is set to 50ppm, which is not compliant with IEEE 802.15.4-2015. Moreover, we cannot use the CONFIG_CLOCK_CONTROL_NRF_ACCURACY kconfig as a return in the otPlatRadioGetCslAccuracy function because it must be configurable by users, depending on the used oscillators. Signed-off-by: Arkadiusz Balys <[email protected]> (cherry picked from commit aec518c)
1 parent e910112 commit da762fc

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

modules/openthread/Kconfig.nrf5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,12 @@ config NRF5_LOG_RX_FAILURES
6767
It can be helpful for the network traffic analyze but it generates also
6868
a lot of log records in a stress environment.
6969

70+
config NRF5_DELAY_TRX_ACC
71+
int "Clock accuracy for delayed operations"
72+
default CLOCK_CONTROL_NRF_ACCURACY if BOARD_NRF52840DONGLE_NRF52840
73+
default 20 # Value agreed after research as the best for power consumption and system reliability.
74+
help
75+
Accuracy of the clock used for scheduling radio delayed operations (delayed transmission
76+
or delayed reception), in ppm.
77+
7078
endif # !NET_L2_OPENTHREAD

modules/openthread/platform/radio_nrf5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ otError otPlatRadioReceiveAt(otInstance *aInstance, uint8_t aChannel, uint32_t a
13281328
LOG_DBG("nRF5 OT radio RX AT started (channel: %d, aStart: %u, aDuration: %u)", aChannel,
13291329
aStart, aDuration);
13301330

1331-
return result ? OT_ERROR_FAILED : OT_ERROR_NONE;
1331+
return result ? OT_ERROR_NONE : OT_ERROR_FAILED;
13321332
}
13331333
#endif
13341334

@@ -1554,7 +1554,7 @@ uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance)
15541554
{
15551555
ARG_UNUSED(aInstance);
15561556

1557-
return CONFIG_CLOCK_CONTROL_NRF_ACCURACY;
1557+
return CONFIG_NRF5_DELAY_TRX_ACC;
15581558
}
15591559

15601560
#if defined(CONFIG_OPENTHREAD_PLATFORM_CSL_UNCERT)

0 commit comments

Comments
 (0)