-
Notifications
You must be signed in to change notification settings - Fork 3k
NRF52_DK: adapt ticker and sleep drivers to the new standards + test updates #6961
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
NRF52_DK: adapt ticker and sleep drivers to the new standards + test updates #6961
Conversation
|
I have restarted Jenkins and got the same failure with |
targets/targets.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't claim mbed 2 support for the nrf52 series.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
targets/targets.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the list alphabetically sorted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer compatible with SDK 14.2. Please see the email I sent you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we need that as soon as possible I will add your changes in the next step.
It is possible that the difference between base and next tick count on some platforms is greater than 1, in this case we need to repeat counting with the reduced number of cycles (for slower boards). If number of cycles has been reduced than base tick count needs to be redefined. This operation is missing and is added by this patch.
Test inserts event into the TimerEvent object which is scheduled 50 ms in the future. Then test thread hangs on the semaphore for 51 ms and after that time we expect that event handler has been executed. This test fails sometimes on NRF51_DK, NRF52_DK since different clocks are used for event handling and delay. TimerEvent class uses fast us ticker and semaphores are based on lp ticker (NRF51_DK) or System Tick Timer (NRF52_DK). We assume that ticker measurement error is 10% and our 1 [ms] extra corresponds to 2% error. I suggest to increase delay to 2 [ms] (4%). This should be enough for all boards at this moment.
Represent tolerance value as it is done in `tests-mbed_drivers_timer`. Use 5% tolerance for lp ticker.
NRF52_DK is now based on fast and accurate 1MHz counter.
This function should perform instruction cycles count in critical section. Additionally remove redundant code.
This functionality is required by new sleep standards.
|
@OPpuolitaival I've restarted jenkins but we were getting some weird errors: |
|
Investigating |
|
@bulislaw probably related to this: ARMmbed/mbed-cli#660 |
|
@mprse We will run CI as soon as reviewers approve this . I'll do my review now |
0xc0170
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about nrf51 in nrf52 implementation, not blocking
| } | ||
|
|
||
| #if defined(TARGET_MCU_NRF51822) | ||
| void common_rtc_irq_handler(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is for NRF52, can this TARGET_MCU_NRF51822 be actually set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file will be moved to TARGET_NRF5x. But I would like to do it in the next step together with some changes proposed by @marcuschangarm.
|
Enabled ticker support for entire MCU_NRF52832 family (not only NRF52_DK). |
bulislaw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run CI.
Description
This PR:
In current version we will use same driver as for NRF51_DK. If this step will be successful, then in the next step we can try to use 32 bit counter for us ticker (instead 16 bit counter) and low power counter instead of RTC for lp ticker.
@bulislaw @0xc0170 Can we run morph and perform review here ASAP in order to get it merged before Friday?
Pull request type