Skip to content

Fix possible overflow of NRF51 os tick. #2410

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

Merged
merged 1 commit into from
Aug 11, 2016

Conversation

pan-
Copy link
Member

@pan- pan- commented Aug 10, 2016

The RTC1 counter can increase while the new value for the CC register
used by the os tick is computed. As a result, when interrupts are enabled
again RTC1 counter and CC register value are equal. If these two values are
equal then the interrupt for the CC channel used by the OS tick will be
generated the next time the RTC counter reach that value.
In other words, the next OS tick will occur 131 seconds latter.

This issue possibly concern all NRF51 targets with 32K of RAM but is
only visible on NRF51_DK target when their is heavy BLE load.

The RTC1 counter can increase while the new value for the CC register
used by the os tick is computed. As a result, when interrupts are enabled
again RTC1 counter and CC register value are equal. If these two values are
equal then the interrupt for the CC channel used by the OS tick will be
generated the next time the RTC counter reach that value.
In other words, the next OS tick will occur 131 seconds latter.

This issue possibly concern all NRF51 targets with 32K of RAM but is
only visible on NRF51_DK target when their is heavy BLE load.
@pan-
Copy link
Member Author

pan- commented Aug 10, 2016

@0xc0170 Could you review this ?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 10, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=GCC_ARM,ARM,IAR
TARGETS=NRF51_DK,NRF51_MICROBIT

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 10, 2016

LGTM

Jenkins failed as it could not checkout the sha, can't tell why. I run another CI job

@mbed-bot
Copy link

[Build 793]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@0xc0170 0xc0170 merged commit fca16f8 into ARMmbed:master Aug 11, 2016
@pan- pan- deleted the fix_nrf51_os_tick branch September 27, 2016 13:45
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.

3 participants