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

cpu/efm32/pm: fix blocking EM1 #18775

Merged
merged 2 commits into from
Oct 20, 2022
Merged

cpu/efm32/pm: fix blocking EM1 #18775

merged 2 commits into from
Oct 20, 2022

Conversation

jue89
Copy link
Contributor

@jue89 jue89 commented Oct 19, 2022

Contribution description

This PR enable users to block EFM32_PM_MODE_EM1 if required.

Testing procedure

Programming tests/periph_pm to an EFM32-based board:

2022-10-19 17:56:56,151 # main(): This is RIOT! (Version: 2023.01-devel-93-g345af-feature/efm32-series2)
2022-10-19 17:56:56,157 # This application allows you to test the CPU power management.
2022-10-19 17:56:56,214 # The available power modes are 0 - 2. Lower-numbered power modes
2022-10-19 17:56:56,217 # save more power, but may require an event/interrupt to wake up
2022-10-19 17:56:56,218 # the CPU. Reset the CPU if needed.
2022-10-19 17:56:56,218 # mode 0 blockers: 0 
2022-10-19 17:56:56,218 # mode 1 blockers: 1 
2022-10-19 17:56:56,218 # mode 2 blockers: 0 
2022-10-19 17:56:56,219 # Lowest allowed mode: 2
2022-10-19 17:56:56,219 # [pm] enter EFM32_PM_MODE_EM1
> pm block 2
2022-10-19 17:57:28,977 # pm block 2
2022-10-19 17:57:28,978 # Blocking power mode 2.
> pm show
2022-10-19 17:57:42,618 # pm show
2022-10-19 17:57:42,619 # mode 0 blockers: 0 
2022-10-19 17:57:42,620 # mode 1 blockers: 1 
2022-10-19 17:57:42,620 # mode 2 blockers: 1 
2022-10-19 17:57:42,621 # Lowest allowed mode: 3
> pm unblock 2
2022-10-19 17:57:58,481 # pm unblock 2
2022-10-19 17:57:58,482 # Unblocking power mode 2.
2022-10-19 17:57:58,485 # [pm] enter EFM32_PM_MODE_EM1

Issues/PRs references

#13475 yielded #17895, which already prepared the EFM32 CPUs to take the IDLE pm into account.
#17883 implements the same logic for the samd5x cpu family.

@jue89 jue89 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Platform: ARM Platform: This PR/issue effects ARM-based platforms CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: pm Area: (Low) power management Area: cpu Area: CPU/MCU ports labels Oct 19, 2022
@jue89 jue89 requested review from benpicco and gschorcht October 19, 2022 16:09
@jue89 jue89 marked this pull request as ready for review October 19, 2022 16:09
@jue89 jue89 requested a review from kaspar030 as a code owner October 19, 2022 16:09
@riot-ci
Copy link

riot-ci commented Oct 19, 2022

Murdock results

✔️ PASSED

67b3800 cpu/efm32/pm: add debug output

Success Failures Total Runtime
1991 0 1991 06m:24s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@jue89 jue89 force-pushed the fix/efm32_pm_idle branch from 6c73e1a to 67b3800 Compare October 19, 2022 16:17
@jue89 jue89 enabled auto-merge October 19, 2022 21:48
@jue89 jue89 merged commit 4308227 into RIOT-OS:master Oct 20, 2022
@jue89 jue89 deleted the fix/efm32_pm_idle branch October 20, 2022 08:44
@jue89
Copy link
Contributor Author

jue89 commented Oct 20, 2022

Thank you :)

@kaspar030 kaspar030 added this to the Release 2023.01 milestone Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: pm Area: (Low) power management CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants