-
Couldn't load subscription status.
- Fork 1.4k
tests: benchmark: multicore: Test PWM with low power modes #17380
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
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: bf1942906eef14f2a69d7244a9ece4dbd1c79892 more detailssdk-nrf:
zephyr:
Github labels
List of changed files detected by CI (31)Outputs:ToolchainVersion: 6c44240e03 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
cdcbe0e to
3ec29a8
Compare
|
Tested manually without PPK / amperemeter. 'benchmarks.multicore.idle_with_pwm.nrf54h20dk_cpuapp_cpurad.no_sleep' loops as expected - LED2 lights up, then OFF for ~1 sec, then lights up again, etc. 'benchmarks.multicore.idle_with_pwm.nrf54h20dk_cpuapp_cpurad.s2ram' doesn't work as expected. No PWM signal after entering low power mode - LED2 lights up, then it's OFF forever. It looks like some PWM/GPIO configuration is missing after system restores from low power. |
3ec29a8 to
de6dc40
Compare
6605d4d to
01b02c6
Compare
|
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
01b02c6 to
76d64b9
Compare
tests/benchmarks/multicore/idle_with_pwm/remote/boards/nrf54h20dk_nrf54h20_cpurad.overlay
Outdated
Show resolved
Hide resolved
6b4b85b to
83c201d
Compare
83c201d to
6bed1f1
Compare
dd59b7a to
4c06f99
Compare
c145cbd to
96c9c45
Compare
96c9c45 to
7c968c2
Compare
b7381a8 to
6f12840
Compare
|
@gmarull Please revisit |
|
@nrfconnect/ncs-co-build-system Ping |
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 don't see what this has to do with a dts property, you can access dts properties in Kconfig, where is that happening here?
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.
min-residency-us is defined in DTS:
https://github.com/nrfconnect/sdk-zephyr/blob/main/dts/common/nordic/nrf54h20.dtsi#L127
Core has to sleep for more than 'min-residency-us' in order to enter that specific low power state.
It is used in main.c:
https://github.com/nordic-segl/sdk-nrf/blob/NRFX-6370_PWM_with_s2ram/tests/benchmarks/multicore/idle_with_pwm/src/main.c#L93
Default value of 1000ms is greater than min-residency for S2RAM state.
Here
https://github.com/nordic-segl/sdk-nrf/blob/NRFX-6370_PWM_with_s2ram/tests/benchmarks/multicore/idle_with_pwm/testcase.yaml#L28
KConfig value is set to 500 ms, which is too low to enter the deepest S2RAM while sufficient to enter IDLE.
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.
Use a multiplier then and in the code take the dts property and multiply it so it can work with any board/future soc?
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 think whatever I do it will not scale easily. Power states and min-residency-us is very specific to a target (in fact, core).
"in the code take the dts property"
- I can't take dts property of &s2ram as it is valid only for nrf54h20dk/nrf54h20/cpuapp.
- I can't take dts property of &idle because it's going to be removed:
https://github.com/nrfconnect/sdk-zephyr/pull/2032/files#diff-3455660ed5585b71497d4674c6a03a570690d462406141ea0170df7c10f28391
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.
as above
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.
these values come from dts? E.g.
pwmleds {
compatible = "pwm-leds";
red_pwm_led: red_pwm_led {
pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
};
green_pwm_led: green_pwm_led {
pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
};
blue_pwm_led: blue_pwm_led {
pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
};
};
So why are they being hacked here?
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.
20 ms is too high for this test. I wanted to set it in one place for all platforms.
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.
FILE_SUFFIX ?
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.
No 😄
I believe FILE_SUFFIX will be applied to overlays as well. I have one overlay for all three test configurations (no_sleep, idle, s2ram).
I just need a bunch of KConfigs to enter s2ram and idle.
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.
It applies if the file exists, if not it uses the normal one without the suffix
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.
Can this be addressed later? This PR blocks everybody working on Lilium.
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 comment is non blocking
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.
FILE_SUFFIX?
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.
as above
5b72af8 to
88b69f3
Compare
Add test that confirms correct operation of PWM when target enters and leaves low power mode. Signed-off-by: Sebastian Głąb <[email protected]>
Instead of defining power states per test, add power states to the nrf54h20/cpuapp target definition. Remove power states from tests overlays to prevent build failures due to duplicated node definitions. Signed-off-by: Sebastian Głąb <[email protected]>
Add missing entry integration_platforms in testcase.yaml in: /tests/benchamrks/multicore/idle_spim, /tests/benchamrks/multicore/idle_twim, /tests/benchamrks/multicore/idle_uarte. Set value to nrf54h20dk/nrf54h20/cpuapp in all three tests. Signed-off-by: Sebastian Głąb <[email protected]>
Remove power states from tests overlays to prevent build failures due to duplicated node definitions. Signed-off-by: Robert Lubos <[email protected]>
88b69f3 to
bf19429
Compare
| return ret; | ||
| } | ||
|
|
||
| /* Sleep 1 second */ |
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 comment is wrong
Add test that confirms correct operation of PWM
when target enters and leaves low power mode.