Registered User |
Registered User mNo edit summary Tag: 2017 source edit |
||
(63 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{ApplicableFor | ||
{{ | |MPUs list=STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
{{ | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
}}</noinclude> | |||
{{TrustedDomainApplicability | TDflavor = M33-TD| applicable = no}} | |||
==Article purpose== | ==Article purpose== | ||
The purpose of this article is to give an overview of the software APIs available on the Arm<sup>®</sup> Cortex<sup>®</sup>- | The purpose of this article is to give an overview of the software APIs available on the Arm<sup>®</sup> Cortex<sup>®</sup>-M (also named MCU) side to handle the low power modes, acting as coprocessor . | ||
==Low power modes available on the chip== | ==Low power modes available on the chip== | ||
The low power modes are handled by [[RCC internal peripheral|RCC]] and [[PWR internal peripheral|PWR]] peripherals. | |||
The | |||
See [[Platform power overview]] for mode description or refer to the [[STM32_MPU_resources#Reference manuals|STM32 MPU reference manuals]] the full description of the modes. | |||
===Wakeup sources=== | ===Wakeup sources=== | ||
The | The low power modes are left due to a wakeup event. It can be configured by setting the wakeup control feature of the IP and activating the corresponding [[EXTI_internal_peripheral|'''EXTI''']] on MCU side. | ||
The wake sources are listed in the [[Platform power overview]] page. | |||
==Software overview== | ==Software overview== | ||
The power HAL is used to select the Cortex-M4 low power mode. | * '''{{MicroprocessorDevice | device=15}}''' | ||
: The power HAL is used to select the Cortex-M4 low power mode. | |||
Further information on HAL can be found here: [[ | : Further information on HAL can be found here: [[STM32CubeMP15 Package architecture]] | ||
* '''{{MicroprocessorDevice | device=2}}''' | |||
: The power HAL is used to select the Cortex-M33 low power mode when it is running '''in internal RETRAM'''. This mode can be enable by adding the {{highlightParam|keep-power-in-suspend}} property to the remoteproc node in the Linux device tree. For detail, refer to the [[Linux_remoteproc_framework_overview##Power_Domain_Selection|remotreproc power node]] . | |||
: The Cortex-M33 low power modes are not supported when the MCU firmware is running '''in DDR'''. In such case the firmware needs to be [[Linux_remoteproc_framework_overview#Remote_processor_stop|stopped]] and the associated resources must be released before requesting low power mode on the MPU side with Linux (see [[Power overview]] for detail). | |||
: Further information on HAL can be found here: [[STM32CubeMP2 Package architecture]] | |||
===APIs description=== | ===APIs description=== | ||
The power HAL supports the following APIs related to power management: | The {{MicroprocessorDevice | device=15}} power HAL supports the following APIs related to power management: | ||
* <code>HAL_PWR_EnterSLEEPMode</code>: CSleep mode is entered | |||
* <code>HAL_PWR_EnterStopMode</code>: CStop mode is entered allowing Stop as the deepest platform low power mode | |||
* <code>HAL_PWR_EnterStandbyMode</code>: CStop mode is entered allowing Standby as the deepest platform low power mode | |||
==Code source location== | |||
===For {{MicroprocessorDevice | device=15}}=== | |||
The [[STM32CubeMP15 Package]] provides: | |||
* power HAL driver: | |||
** {{CodeSource | STM32CubeMP1 | Drivers/STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_pwr.c}} | |||
** {{CodeSource | STM32CubeMP1 | Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_hal_pwr.h}} | |||
* EXTI driver: {{CodeSource | STM32CubeMP1 | Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_hal_exti.h}} | |||
===For {{MicroprocessorDevice | device=2}}=== | |||
The [[STM32CubeMP2 Package]] provides: | |||
* power HAL driver: | |||
** {{CodeSource | STM32CubeMP2 | Drivers/STM32MP2xx_HAL_Driver/Src/stm32mp2xx_hal_pwr.c}} | |||
** {{CodeSource | STM32CubeMP2 | Drivers/STM32MP2xx_HAL_Driver/Inc/stm32mp2xx_hal_pwr.h}} | |||
* EXTI driver: {{CodeSource | STM32CubeMP2 | Drivers/STM32MP2xx_HAL_Driver/Inc/stm32mp2xx_hal_exti.h}} | |||
<noinclude> | |||
[[ | [[Category:Coprocessor management STM32Cube]] | ||
{{ | [[Category:Platform power|2]] | ||
{{PublicationRequestId | 10389 | 2019-01-21 | AlainF}} | |||
{{ArticleBasedOnModel|Framework overview article model}} | |||
</noinclude> |
Latest revision as of 17:25, 30 June 2025
1. Article purpose[edit | edit source]
The purpose of this article is to give an overview of the software APIs available on the Arm® Cortex®-M (also named MCU) side to handle the low power modes, acting as coprocessor .
2. Low power modes available on the chip[edit | edit source]
The low power modes are handled by RCC and PWR peripherals.
See Platform power overview for mode description or refer to the STM32 MPU reference manuals the full description of the modes.
2.1. Wakeup sources[edit | edit source]
The low power modes are left due to a wakeup event. It can be configured by setting the wakeup control feature of the IP and activating the corresponding EXTI on MCU side.
The wake sources are listed in the Platform power overview page.
3. Software overview[edit | edit source]
- The power HAL is used to select the Cortex-M4 low power mode.
- Further information on HAL can be found here: STM32CubeMP15 Package architecture
- STM32MP2 series
- The power HAL is used to select the Cortex-M33 low power mode when it is running in internal RETRAM. This mode can be enable by adding the keep-power-in-suspend property to the remoteproc node in the Linux device tree. For detail, refer to the remotreproc power node .
- The Cortex-M33 low power modes are not supported when the MCU firmware is running in DDR. In such case the firmware needs to be stopped and the associated resources must be released before requesting low power mode on the MPU side with Linux (see Power overview for detail).
- Further information on HAL can be found here: STM32CubeMP2 Package architecture
3.1. APIs description[edit | edit source]
The STM32MP15x lines power HAL supports the following APIs related to power management:
HAL_PWR_EnterSLEEPMode
: CSleep mode is enteredHAL_PWR_EnterStopMode
: CStop mode is entered allowing Stop as the deepest platform low power modeHAL_PWR_EnterStandbyMode
: CStop mode is entered allowing Standby as the deepest platform low power mode
4. Code source location[edit | edit source]
4.1. For STM32MP15x lines
[edit | edit source]
The STM32CubeMP15 Package provides:
- power HAL driver:
- EXTI driver: Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_hal_exti.h
4.2. For STM32MP2 series[edit | edit source]
The STM32CubeMP2 Package provides:
- power HAL driver:
- EXTI driver: Drivers/STM32MP2xx_HAL_Driver/Inc/stm32mp2xx_hal_exti.h