Consequences of not restoring the clock when waking up from STM32 stop mode

Publisher:Harmonious88Latest update time:2017-10-01 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

For a detailed analysis of STM32's low power consumption, please refer to the interpretation of STM32's low power consumption mode . It is mentioned that when STM32 is in stop mode, the chip's 1.8V area clock is turned off, and the HSI and HSE clocks are also turned off. When an enabled interrupt or event occurs, STM32 exits from stop mode. At this time, the default clock of STM32 is HSI. Therefore, if you want to return STM32 to run mode and work normally for a period of time, you must pay attention to the clock problem of STM32 and choose whether to restore the system clock to the clock configuration before stop mode according to the actual situation. 

The chip used in the test is stm32fo30, the HSI clock frequency is 8M, the system frequency is 48M, the PLL multiplication is 12, and the input is HSI/2.


Test the influence of LED lighting time

The systick timer is used for timing. When the button is pressed, the LED lights up and the timer starts timing for 5 seconds. When the timing is up, the LED goes out.

In normal mode, the LED lights up for 5 seconds.

After waking up from stop mode, the system clock is not restored and the LED light turns off after 30 seconds.

Analysis: The system frequency is 6 times the HSI frequency, so the LED lighting time also satisfies the 6-fold relationship.

After waking up from stop mode, the system clock is not restored and the LED light turns off after 30 seconds.

After waking up from stop mode, the system clock is restored and the Timer 5 LED is off.


Test 2, serial port

In normal mode, the serial port can send and receive normally.

After waking up from stop mode, the system clock is not restored, the serial port receives a bunch of garbled characters, and normal data cannot be received. Reason:

The serial port clock is set to the system clock, resulting in a baud rate mismatch.

After waking up from stop mode, the system clock is restored and the serial port reception and transmission are normal.


Summary: Pay special attention to the clock recovery configuration after the STM32 wakes up from stop mode to prevent various minor problems.


Keywords:STM32 Reference address:Consequences of not restoring the clock when waking up from STM32 stop mode

Previous article:STM32F10xxx supports three reset
Next article:Analysis of the different GPIOs of STM32F0 and STM32F1

Recommended ReadingLatest update time:2024-11-15 13:26

Study STM32 Note 3 GPIO settings
/*************************************************************************** Set GPIO basic parameters ***********************************************************************/ void GPIO_Configuration(void) {   GPIO_InitTypeDef GPIO_InitStructure;   //Initialize peripheral GPIOx registers according to the paramete
[Microcontroller]
NVIC_PriorityGroupConfig() Description
There are two concepts of priority in STM32 (Cortex-M3) - preemptive priority and response priority. Some people call response priority "sub-priority" or "sub-priority". Each interrupt source needs to be assigned these two priorities. An interrupt with a high preemptive priority can be responded to during the processi
[Microcontroller]
About the setting and programming of arm clock frequency
  OSC uses a passive crystal oscillator, EXT uses an active crystal oscillator or an external clock. The 12M of 2440 is an Oscillator, which is active! 12M of 2440 is Oscillator   Crystal Passive crystal Oscillator Active crystal (with active devices inside)       The passive crys
[Microcontroller]
STM32 serial port idle interrupt problem
1. The idle interrupt is triggered when a byte of high level (idle) appears after receiving data. It does not mean that the idle interrupt will continue. To be precise, it should be a byte after the rising edge (stop bit). If it is always at a low level, the idle interrupt will not be triggered (it will trigger a brea
[Microcontroller]
MCU clock and different bytes different instruction timing (ALE)
First, paste the structure and circuit of the clock:   Understand what is a machine cycle and an instruction cycle:   The timing of various different bytes and different cycle instructions (important):        
[Microcontroller]
MCU clock and different bytes different instruction timing (ALE)
stm32 rtc real time clock
The real-time clock of STM32 is an independent timer Usually a button battery is added to the power supply end of the backup area, so that the RTC will not stop working when the main power supply is out of power. If the VDD power supply is valid, the RTC can trigger the second interrupt, overflow interrupt and ala
[Microcontroller]
stm32 rtc real time clock
Configuration and calculation of STM32 advanced timer dead time
Complementary outputs and dead-time insertion Dead zone concept The advanced control timers (TIM1 and TIM8) can output two complementary signals and manage the output turn-off and turn-on instants. This period of time is usually called dead time, and the user must adjust the dead time according to the device connected
[Microcontroller]
Configuration and calculation of STM32 advanced timer dead time
STM32 JTAG interface hardware design
1. What is the JTAG interface? From a sensory point of view, the JTAG interface is the blue 20-pin horn socket in the picture above. 2.What is the function of JTAG interface? 1) Download the program to the MCU. 2) Debug the MCU online, such as single-step debugging, power-off debugging, viewing register values, etc.
[Microcontroller]
STM32 JTAG interface hardware design
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号