-
Notifications
You must be signed in to change notification settings - Fork 7.3k
soc: stm32u0: add PM #88878
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
soc: stm32u0: add PM #88878
Conversation
Hello @mickael868, and thank you very much for your first pull request to the Zephyr project! |
} | ||
|
||
/* Initialize STM32 Power */ | ||
void stm32_power_init(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.
Should be called inside
zephyr/soc/st/stm32/stm32u0x/soc.c
Line 28 in c2c3f75
void soc_early_init_hook(void) |
CONFIG_PM=y
.
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.
First surface-level look.
This also lacks power states definition in Device Tree (dts/arm/st/u0/stm32u0.dtsi
- see other series for reference)
Co-authored-by: Mathieu CHOPLAIN <[email protected]>
Co-authored-by: Mathieu CHOPLAIN <[email protected]>
Co-authored-by: Mathieu CHOPLAIN <[email protected]>
Co-authored-by: Mathieu CHOPLAIN <[email protected]>
Co-authored-by: Mathieu CHOPLAIN <[email protected]>
Add AndesTech Platforms section and add me jimmyzhe, kevinwang821020 as maintainer and collaborator. Signed-off-by: Jimmy Zheng <[email protected]>
Added driver for the PAJ7620 gesture sensor. For now, just added basic gesture mode, although sensor also has other modes (proximity and cursor modes). Signed-off-by: Paul Timke Contreras <[email protected]>
Added paj7620 to the testcase so that it is in build. Signed-off-by: Paul Timke Contreras <[email protected]>
Added a sample for using the PAJ7620 gesture sensor Signed-off-by: Paul Timke Contreras <[email protected]>
Extend driver to support single lane and 1-4-4 IO modes. Move flash chip quirks to a separate file. Signed-off-by: Marcin Szymczyk <[email protected]>
Separate compatible is required for Flash MSPI quirks. Signed-off-by: Marcin Szymczyk <[email protected]>
Move MSPI NOR commands to rodata. Replace array with empty padding (~1kB) with macro-based assignments. Ref: NCSDK-32779 Signed-off-by: Tomasz Chyrowicz <[email protected]>
Add additional conversion helpers for `deci` and `centi` output units. Signed-off-by: Jordan Yates <[email protected]>
Fix grouping and general doxygen fixups. Signed-off-by: Anas Nashif <[email protected]>
Fix grouping and general doxygen fixups. Signed-off-by: Anas Nashif <[email protected]>
Fix grouping and general doxygen fixups. Signed-off-by: Anas Nashif <[email protected]>
Fix grouping and general doxygen fixups. Signed-off-by: Anas Nashif <[email protected]>
Group test using doxygen. Signed-off-by: Anas Nashif <[email protected]>
Group test using doxygen. Signed-off-by: Anas Nashif <[email protected]>
Create top level doxygen groups to be used by tests and move to dedidcated dox file for tests. Signed-off-by: Anas Nashif <[email protected]>
Group test using doxygen and other doxygen fixups. Signed-off-by: Anas Nashif <[email protected]>
Group test using doxygen and general fixes to structure. Signed-off-by: Anas Nashif <[email protected]>
Add missing fields for DMA tx and rx configuration macros Signed-off-by: Simon Gilbert <[email protected]>
Add stub functions for the I2C DMA callbacks, which are invoked during or upon completion of DMA-based I2C transactions. Without these, NULL pointer calls occur on DMA transfer complete or error events, leading to faults within ISR context. Signed-off-by: Simon Gilbert <[email protected]>
In STM32N6, AXISRAM1 is next to the 400kB FLEXRAM. By default, the FLEXRAM is configured to extend the AXISRAM1 which put its total size to 1024kB. Signed-off-by: Guillaume Gautier <[email protected]>
In Clang 16 run with some flags, the compiler does not accept a static const variables as struct initializer. This caused build errors in only some contexts. Always use the devicetree macros to access the source device node as a workaround. Signed-off-by: Josuah Demangeon <[email protected]>
The following west manifest projects have changed revision in this Pull Request:
Additional metadata changed:
⛔ DNM label due to: 1 project with metadata changes Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Sorry, I made a mess with the git remotes and it resulted in external commits being incorporated here. |
You should be able to fix the branch by resetting the tree (e.g., |
Closing and reopening to start from a clean local repository. |
AFAIK, the stm32u0 target does not support the Power Management (PM) for now.
This PR copies the PM code from the STM32U5 target with few adaptation (eg.
LL_PWR_STOP0_MODE
->LL_PWR_MODE_STOP0
).Test 0 without this PR : 2mA
Test 1: no peripheral enabled, no way to wake up after entering the stop1 mode: 3µA with the following overlay:
dts/arm/st/u0/stm32u0.dtsi
file) is used for a periodic wake up: 140µA with the following additional overlay:In both cases, it is necessary to disable the
pm_policy_state_lock_get()
calls fromdrivers/serial/uart_stm32.c
because it takes the lock once at the firstprintk()
call and never put it. This is the get backtrace if the banner is enabled:uart_stm32_pm_policy_state_lock_put_unconditional
is never called. Tested withCONFIG_UART_INTERRUPT_DRIVEN=y
.I'm quiet new to Zephyr, does the UART issue comes an error I made?
Also, I think we should expect a lower power consumption when the LPTIM2 timer is used, do you have any idea how to improve this using only internal clocks? I will try to add a LSE oscillator in the next design (mainly for the LPUARTx peripherals) but I can not test it for now.
Thanks.