STM32 Experiment & Note —— (043) STM32 enter low power comsuption mode (Not translated)
»
(001) HAL Library LED Lighting
(002) HAL Library LCD Frame Animation
(003) HAL Library FFT Dynamic Spectrum
(004) HAL Library FFT Speed Up
(005) HAL Library Understanding DMA
(006) Watchdog Summary
(007) GPIO Usage Steps
(008) CubeIDE Implementation of USB Peripherals*
(009) Why C99
(010) Linux UDP
(011) Linux TCP
(012) Temperature Control of Arm
(013) OpenWrt cross-compilation
(014) Basic data type in C99
(015) C99 struct
(016) C99 enum
(017) C99 funciont and L-Value, R-Value
(018) C99 pointer*
(019) C99 With only value assignment*
(020) C99 array with space, pointer with no space
(021) C99 No template function
(022) POSIX pthread multi-threads mutex*
(023) POSIX pthread multi-threads programming*
(024) C99 if
(025) C99 switch
(026) C99 loop
(027) C99 time and wait*
(028) High-precision calculation with GMP*
(029) Web Service Lib*
(030) International Components for Unicode (ICU)*
(031) Performance of C is higher than C++, because...*
(032) C99 weak function
(033) MTU TCP SOCKET
(034) STM32 UART Continually Sending Data
(035) STM32 UART Continually Receiving Data
(037) STM32 Normal and Circle
(038) STM32 UART clear transfer error flag
(039) STM32 UART Idle Callback
(040) STM32 UART, RS232 single TX line
(041) STM32 RS485 Differential signal communication
(042) STM32 HAL DMA Poll For Transfer
(043) STM32 enter low power comsuption mode
(044) STM32 Clear Flag of TCx in DMA IRQ
(045) STM32软件函数命名规范
(046) Deal with Idle in xxxCpltCallback
(047) C99 Built in macros
(048) isr enabled after calling ***_IT
(049) Procedure of starting STM32
(050) Load new firmware online
(051) SCB->VTOR
(052) STM32 Address space in programme
(053) STM32 Move program to other space
(054) STM32 Bootloader
(055) Keil中的下载算法
(056)编译器优化出错点
🍓(001) Close Swapfile
🍓(002) Format USB disk to ext4 with 1k blocks
🍓(003) Query Linux Version info and CPU info
🍓(004) Speed up latest version of Ubuntu
🍓(005) Clone 360 Browser Core Source Code Script
🍓(006) Before run Firefox in Ubuntu24.04
🍓(007) MAC Address
🍓(008) RMII & PHY
🍓(009) Ubuntu Server firewall configuration
🍓(010) Linux yield cpu by code
🍓(011) Linux Hardware Concept
🍓(012) Linux Inter-Process Communication
🍓(013) Ban Git force push
🍓(014) Ban Git reset --hard
🍓(015) Save unsaved cache to disk immedutely
🍓(016) 拷贝pre-receive到每个git仓库的脚本
🍓(017) sshd密码输入错误禁用IP3分钟
🖥️(001) 异机备份低功耗自用Git服务器搭建
🖥️(002) OpenWRT配置注意事项
🕹️(001) while(1){} cpu reentered
🕹️(002) functions for multi-thread in FreeRTOS
🕹️(003) FreeRTOS critical code zone
🕹️(004) FreeRTOS fix NULL not defined error
🕹️(005) lowest priority interrupt of ARM: PENDSV
🕹️(006) Configuration of tasks priority levels
🕹️(006) Cautions of different priority tasks locked
🕹️(008) Close scheduling of same priority tasks
🕹️(009) OTA Technology
🕹️(010) FreeRTOS create static task
🕹️(011) FreeRTOS list task list
🕹️(012) FreeRTOS HeapSize statistics
🕹️(013) FreeRTOS xTaskGetHandle
🕹️(014) FreeRTOS common method of create tasks
🕹️(015) FreeRTOS fix problem of tasks locked
🕹️(016) FreeRTOS Superest interrupt: SVC
🕹️(017) FreeRTOS interrupt call in privilege mode
🕹️(018) FreeRTOS SVC enter user mode
🕹️(019) FreeRTOS delay util
🕹️(020) FreeRTOS low consumption by Tickless
🕹️(021) FreeRTOS IdleHook
🕹️(022) FreeRTOS Hooks
🕹️(023) FreeRTOS yield CPU by code
🕹️(024) FreeRTOS semaphore
🕹️(025) FreeRTOS resolve priority inversion
🕹️(026) FreeRTOS get task priority
🕹️(027) FreeRTOS set task priority
🕹️(028) FreeRTOS function prefix
🕹️(029) Don't call RTOS function in IRQ handle
🕹️(030) Bottom half operation decrease semaphore
🕹️(031) Support Suspending for ever
🕹️(032) Call FreeRTOS SysCall in ISR
🕹️(033) Principle of Top Half and bottom haf
🕹️(034) FATFS in STM32 support exFat
🕹️(035) Message Queue in FreeRTOS
🕹️(036) Timer Tasks in FreeRTOS
🕹️(037) Reason of can not ping board
🕹️(038) LwIP Tcp Server Sample Code
🕹️(039) mutex equals binarySempahore
🕹️(040) Relationship between MEMP and Pbuf
🕹️(041) FreeRTOS连接ESP WiFi(待完成)
📟(001)CMSIS标准学习
🕹️(001)函数调用被优化
STM32进入低功耗模式(睡眠模式)的方法:
一、裸机手动调用直接进入
1)WFI等待外部中断唤醒:
__WFI()
当执行WFI指令后,ARM核心会立即进入低功耗待机状态,直到有中断服务事件发生。WFI适用于需要等待外部中断的场景‌。
2)WFE等待事件唤醒:
__WFE();
依赖于一个单比特的事件寄存器。如果事件寄存器的值为0,WFE会进入低功耗待机状态,等待事件发生;如果事件寄存器的值为1,WFE会立即执行完成,不会进入待机状态。WFE特别适用于多核环境中的同步操作。

二、FreeRTOS IDLE任务等待1Tick自动进入睡眠模式
智能问答:FreeRTOS提供了一个名为Tickless低功耗模式的功能,该模式可以在系统空闲时自动进入睡眠模式以降低功耗。

三、裸机开发过程:
在STM32CubeMX中配置PB9为GPIO_EXTI9硬件中断,GPIO模式为上升沿触发扩展中断模式
完成中断处理函数:
void EXTI9_5_IRQHandler(void){
}
在主while循环中调用:
__WFI()

四、FreeRTOS开发过程:
定义中断处理函数即可实现产生中断时直接退出睡眠模式。

五、STM32退出低功耗模式(睡眠模式)的方法:
1)有中断调用时直接退出低功耗模式
2)有等待事件发生时退出低功耗模式

六、唤醒延时:
无延时

七、等待中断睡眠模式低功耗原理:
CPU停止运行,外设正常运行,等待中断或事件调用

注:定时器不是CPU的一部分。



扩展:
STM32裸机或FreeRTOS退出睡眠模式的方法:
1)任何中断或事件都可以唤醒
文学扩展:为了节省能源,探路者号关闭了主耗能设备

STM32裸机或FreeRTOS进入停机模式(深度睡眠)的方法:
1)将SLEEPDEEP置为1;
2)将PWR_CR的PDDS清零;
3)配置PWR_CR的LPDS为调压器模式;
4)开发用于唤醒的中断模式的EXTI扩展中断线及中断处理函数或者开发用于唤醒的事件模式的EXIT扩展中断线及中断处理函数
5)调用WFI或WFE
指定的外部中断、RTC、IWDG复位可以唤醒
文学扩展:探路者号开始停机、进入长期休眠模式

STM32裸机或FreeRTOS进入待机模式(最低功耗模式)的方法:
1)将SLEEPDEEP置为1;
2)将PWR_CR的PDDS置为1;
3)将PWR_CSR的WUF清零;
4)将所选唤醒源(RTC闹钟、RTC唤醒、RTC入侵或RTC时间戳标志)对应的RTC标志清零;
5)调用WFI或WFE
特殊的退出过程:WKUP引脚上升沿或RTC唤醒源或NRST引脚复位或IWDG复位
文学扩展:探路者号停止了所有的功能,等待着将来的某一时刻被重启

«
--Alex.Zhang
--www.v-signon.com Learningers Co-Encouraged
Back
Personal Art: www.up-task.com Unit: Individual
中文 Русский 京ICP备19038994号-2
If the content on this website infringes upon your any rights, please contact me at 1307776259@qq.com for removal