-
Notifications
You must be signed in to change notification settings - Fork 3k
Add tests for critical section HAL API #5789
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
Add tests for critical section HAL API #5789
Conversation
@scartmell-arm |
cc5630d
to
182dca7
Compare
support for NRF5x added |
92f0217
to
f90759a
Compare
cdf8ff8
to
4560558
Compare
{ | ||
// NRF5x targets don't disable interrupts when in critical section, instead they mask application interrupts this is due to BLE stack | ||
// (BLE to be operational requires some interrupts to be always enabled) | ||
#ifdef TARGET_NRF52_DK |
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.
wasn't there somewhere a request for having function to check if interrupts are enabled? Or even an implementation?
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.
indeed, there is function hal_in_critical_section()
, but it would be nice to verify API functions by something form outside critical section API. us_ticker
could be used to check interrupts but unfortunately it utilises core_util_critical_section_
(which also call HAL critical API ) and it brakes the test. Generly we should always use platform core_util_critical_section
not HAL, in particular we cannot use both in the same time
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.
I was concerned about the portability (how this function can grow in time).
Looks fine to test this here.
/morph build |
1 similar comment
/morph build |
Build : SUCCESSBuild number : 910 Triggering tests/morph test |
Jenkins didn't report abort. /morph export-build |
Test : FAILUREBuild number : 752 |
Exporter Build : SUCCESSBuild number : 590 |
4560558
to
628f521
Compare
@scartmell-arm @0xc0170 It turned out that none of interrupts handled by I modified the checking code from:
to:
Now we check __NRF_NVIC_APP_IRQS_1 only when __NRF_NVIC_APP_IRQS_0 are masked |
/morph build |
Build : SUCCESSBuild number : 934 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 621 |
/morph build |
Build : SUCCESSBuild number : 951 Triggering tests/morph test |
Test : SUCCESSBuild number : 781 |
Exporter Build : SUCCESSBuild number : 638 |
Description
This PR contains critical section HAL API tests.
Test were created based on documentation provided in PR #5346
Status
READY
Migrations
NO
Notes
in order to run these tests #5346 has to be merged first,Todos