1. IO port related to RTC: PC13 (TAMPER-RTC) cannot be set to GPIO_Mode_AN state, otherwise it will not enter the RTC interrupt. (It can be set to GPIO_Mode_IN).
2. RTC_WakeUpCmd(DISABLE) is required before setting the RTC clock. This sentence is not in the official example. If this sentence is not there, the RTC will only be reset when the power is turned on again, and the RTC will not be reset when the program is run again.
3. Before setting the RTC timer wake-up interrupt, be sure to clear the corresponding interrupt, otherwise the phenomenon will be that the RTC interrupt can sometimes be entered but sometimes cannot be entered.
RTC_ClearITPendingBit(RTC_IT_WUT);
RTC_ITConfig(RTC_IT_WUT, ENABLE);
4. When the RTC periodic interrupt wakes up the CPU from stop mode, the Wake-Up flag must be cleared, otherwise the RTC interrupt can only be entered once and cannot be entered subsequently.
if(PWR_GetFlagStatus(PWR_FLAG_WU) != RESET) // Check if the wakeup flag is set
{
PWR_ClearFlag(PWR_FLAG_WU);
}
Unresolved issues: After the RTC wakes up the CPU, if MSI is configured as the clock source, when entering low power consumption again, the power consumption remains at 60-70ua, and the reason is unknown; when HSE is used as the interrupt source, the RTC interrupt will no longer be entered after three or four times. Currently, HSI is used as the interrupt source after RTC wakes up.
Previous article:Level control of 485 transceiver control angle of STM32 serial port
Next article:STM32F051 Comparator
Recommended ReadingLatest update time:2024-11-16 19:59
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 1kHz, 0dB test signal
- [RISC-V MCU CH32V103 Review] -- Advancing Wiki -- Opening
- How is the precise measurement of the Wheatstone bridge demonstrated?
- Pnp Darlington tube cannot be driven
- Giant 555 Timer
- [BearPi-HM Nano] Burning system and the first program
- [New ways to play SAMR21] 25. Using LPS22H sensor
- [N32L43X Review] 3. Hardware I2C drive OLED
- CC26x2R LaunchPad Development Kit
- MOSFET Failure Causes