-
Notifications
You must be signed in to change notification settings - Fork 2k
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
AVR-8: Implement Power Management #19784
Conversation
8d09e1b
to
601ba05
Compare
1f05ebc
to
3d1e300
Compare
I have impression that Murdock is randomly failing. |
The order in which app+board pairs are build is pretty random and the CI run stops once the first failure is hit. This could indeed result in pretty random failures, if more than on app fails. The lasted failure (different modules used when building with diff --git a/cpu/avr8_common/Kconfig b/cpu/avr8_common/Kconfig
index 03a0f40b5a..d82c187042 100644
--- a/cpu/avr8_common/Kconfig
+++ b/cpu/avr8_common/Kconfig
@@ -12,6 +12,8 @@ config CPU_ARCH_AVR8
select HAS_ARCH_AVR8
select HAS_PERIPH_PM
+ select MODULE_AVR8_COMMON_PERIPH if TEST_KCONFIG
+ select MODULE_PM_LAYERED if TEST_KCONFIG
select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG
select MODULE_TINY_STRERROR_AS_STRERROR if TEST_KCONFIG
# static C++ constructors need guards for thread safe initialization
@@ -41,6 +43,13 @@ config MODULE_AVR8_COMMON
help
AVR-8 common code.
+config MODULE_AVR8_COMMON_PERIPH
+ bool
+ depends on TEST_KCONFIG
+ default y
+ help
+ Common peripheral drivers used across different AVR-8 MCU families.
+
# the atmel port uses stdio_uart by default
choice STDIO_IMPLEMENTATION
default MODULE_STDIO_UART This one:
is indeed a race condition in the build system that is triggered when compiling that app for |
3d1e300
to
3432f5b
Compare
This seems ready to go! |
3432f5b
to
d61157f
Compare
rebased since #19777 got merged. |
I was wondering if there is anything pending on this : ) |
ping |
I can pick this up after I finish with the release, feel free to ping me in a few days. |
Ping @MrKevinWeiss : ) |
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.
After a quick look things seem OK, maybe some logic issues for your consideration. I will try to test tomorrow when I am in the office. (I need to also familiarize myself with the whole PM stuff).
f7c6b02
to
86ef5fd
Compare
I'll also do the rebase to resolve the merge conflict |
This refactor the current xmega PM peripheral to avr8 common and extend PM to cpus families. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Fix the required PM state on i2c and spi peripherals. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add PM blocks to adc/i2c/spi peripherals. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This is necessary to allow run the thread_duel example. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The board have one user button and a user led but are not enabled. This add necessary support to use the button and the led. It include the configs to use with SAUL and button interrupt. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net> Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com> Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
86ef5fd
to
a50ba48
Compare
Looks like #20130 contains a bug :-/ |
Ran dist/tools/insufficient_memory for all AVR8 boards.
a50ba48
to
82d98ed
Compare
Thank you for all help @maribu and @MrKevinWeiss |
Thanks for the contribution! |
Contribution description
The Xmega have a Power Management implementation. This moves that code to AVR-8 common and enable Power Management for all variants.
Testing procedure
This was tested using examples/thread_duel and tests/periph/pm examples on atxmega-a1u-xpro and atmega328p-xplained-mini boards. It may requires more tests and any help is welcome.
Issues/PRs references
This is a preparation for future scheduling and IRQ optimizations.