samples/boards/stm32/power_mgmt/serial_wakeup/README.html · samples/boards/stm32/power_mgmt/serial_wakeup/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Boards · STM32 Serial Power

STM32 PM Serial Wakeup

Stop-mode clock과 wakeup-source UART를 구성해 shell 입력으로 깨웁니다.

Official pathsamples/boards/stm32/power_mgmt/serial_wakeup/README.html
Source filesamples/boards/stm32/power_mgmt/serial_wakeup/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

LSE/LSI/HSI 선택, PM shield와 10µA 조건을 설명합니다.

Wake

Shell serial input

Best UART

LPUART · LSE

Target

10 µA

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 C2606F3D029F80BC8F6361B3114249971E76C1E38415474D230393EF49460A46
.. _stm32-pm-serial-wakeup-sample:

STM32 PM Serial wakeup
######################

Overview
********

This sample is a minimum application to demonstrate serial wakeup functionality
in low power context.

.. _stm32-pm-serial-wakeup-sample-requirements:

Requirements
************

1. The board should support enabling PM. For a STM32 based target, it means that
it should support a clock source alternative to Cortex Systick that can be used
in core sleep states, as LPTIM (:dtcompatible:`st,stm32-lptim`).

2. The serial port used by the shell should be configured, using device tree, to
be a functional wakeup source:

  - Clocked by an oscillator available in Stop mode (LSE, LSI) or an oscillator capable
    that can be requested dynamically by device on activity detection (HSI on STM32WB).
  - Matching oscillator sources should be enabled
  - If LSE is selected as clock source and shell serial port is a LPUART current speed
    should be adapted (9600 bauds)
  - Port should be set as "wakeup-source"

Note: Using HSI clock is a specific

Building and Running
********************

Build and flash this sample as follows, changing ``nucleo_wb55rg`` for a board
configured to be compatible with this sample.

.. zephyr-app-commands::
   :zephyr-app: samples/boards/stm32/power_mgmt/serial_wakeup
   :board: nucleo_wb55rg
   :goals: build flash
   :compact:

After flashing, the shell is enabled and device enter sleep mode.
User is able to wake up the device by typing into the shell

PM configurations
*****************

By default, :kconfig:option:`CONFIG_PM_DEVICE` and :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME`
are enabled, but user can also deactivate both or former to see each configuration in play.

Debugging
*********

:kconfig:option:`CONFIG_DEBUG` could be enabled to allow debug. Note that debug mode prevents
target to reach low power consumption.
Also note that after debug mode has been disabled, target should also be powered off in order
to get back to normal mode and reach low power consumption.

PM measurements on stm32l562e_dk using stm32l562e_dk PM shield
**************************************************************

Plug Power shield
Plug ST-Link
Set JP4 To 5V ST-Link
Set SW1 to PM_SEL_VDD
STM32Cube PowerMonitor settings to be applied:

  - Sampling Freq: max
  - Functional Mode: High

Optimal configuration for low power consumption
***********************************************

In order to reach lower power consumption numbers following parameters should be taken
into account:

  - Use a LPUART instead of a basic U(S)ART node
  - Chose LSE as clock source
  - Ensure no other oscillators are enabled (disable HSI, ...)
  - Provide "sleep" pinctrl configuration to other uart nodes.
  - Disable Debug mode

 With all these conditions matched, one can reach 10uA on stm32l562e_dk with this sample.

Part 3

한국어 전문 번역

개요

Low-power context에서 serial wake-up 기능을 보여주는 최소 application입니다.

요구 사항

  1. Board가 PM 활성화를 지원해야 합니다. STM32 기반 target에서는 core sleep state에서도 사용할 수 있는 Cortex SysTick 대체 clock source를 지원해야 하며, 그 예가 LPTIM(st,stm32-lptim)입니다.
  2. Shell이 사용하는 serial port를 Device Tree에서 정상적인 wake-up source로 구성해야 합니다.
  • Stop mode에서 사용할 수 있는 oscillator(LSE, LSI)로 clock을 공급하거나, activity detection 때 device가 동적으로 요청할 수 있는 oscillator(STM32WB의 HSI)로 clock을 공급합니다.
  • 대응하는 oscillator source를 활성화해야 합니다.
  • Clock source로 LSE를 선택하고 shell serial port가 LPUART라면 current speed를 9600 baud로 조정해야 합니다.
  • Port를 wakeup-source로 설정해야 합니다.

Build와 실행

nucleo_wb55rg를 이 sample과 호환되도록 구성한 board로 바꿔 다음과 같이 build하고 flash합니다.

west build -b nucleo_wb55rg samples/boards/stm32/power_mgmt/serial_wakeup
west flash

Flash 뒤 shell이 활성화되고 device가 sleep mode에 들어갑니다. 사용자는 shell에 문자를 입력해 device를 깨울 수 있습니다.

PM configuration

기본적으로 CONFIG_PM_DEVICE와 CONFIG_PM_DEVICE_RUNTIME이 활성화되지만, 사용자가 둘 다 또는 앞의 option을 비활성화해 각 configuration의 효과를 확인할 수 있습니다.

Debugging

Debug를 허용하려면 CONFIG_DEBUG를 활성화할 수 있습니다. 단, debug mode는 target이 low-power consumption에 도달하지 못하게 합니다. Debug mode를 끈 뒤에도 normal mode로 돌아가 low-power consumption에 도달하려면 target의 전원을 완전히 껐다 켜야 합니다.

stm32l562e_dk와 PM shield의 PM 측정

다음과 같이 hardware를 연결하고 switch를 설정합니다.

  • Power shield를 연결합니다.
  • ST-Link를 연결합니다.
  • JP4를 5V ST-Link로 설정합니다.
  • SW1을 PM_SEL_VDD로 설정합니다.

STM32Cube PowerMonitor에는 다음 설정을 적용합니다.

  • Sampling Freq: max
  • Functional Mode: High

Low-power consumption 최적 구성

더 낮은 power-consumption 수치에 도달하려면 다음 parameter를 고려해야 합니다.

  • 기본 U(S)ART node 대신 LPUART를 사용합니다.
  • Clock source로 LSE를 선택합니다.
  • 다른 oscillator가 활성화되지 않았는지 확인합니다. 예를 들어 HSI를 비활성화합니다.
  • 다른 UART node에 sleep pinctrl configuration을 제공합니다.
  • Debug mode를 비활성화합니다.

이 조건을 모두 만족하면 이 sample을 실행하는 stm32l562e_dk에서 10µA에 도달할 수 있습니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.