Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix csl uncertainty reporting max value #784

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CodingRays
Copy link
Contributor

The function to query the csl uncertainty has an incorrect name in the nrf code otPlatRadioGetCslClockUncertainty as opposed to otPlatRadioGetCslUncertainty. See https://github.com/openthread/openthread/blob/main/include/openthread/platform/radio.h#L1212 .

Since openthread has a default weak implementation of the function this doesn't cause any linker errors but instead silently uses 255 which effectively increases the CSL window by a constant 10ms.

Copy link
Member

@abtink abtink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@@ -1416,7 +1416,7 @@ uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance)
return otPlatTimeGetXtalAccuracy() / 2;
}

uint8_t otPlatRadioGetCslClockUncertainty(otInstance *aInstance)
uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the weak implemenation in OT?

We can expect any radio platform supporting CSL should provide this?

@CodingRays
Copy link
Contributor Author

CodingRays commented Jun 5, 2024

To add onto this. Testing the code using the correct value has caused increased synchronization loss in my networks. Especially using the nrf52840 dev kits. In my test setup i had to increase the uncertainty to 40 (from its default of 20). I havent tested any value below 40 aside from the default yet.

Is this something that needs to be addressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants