高级会员

- 积分
- 568
- 金钱
- 568
- 注册时间
- 2015-1-12
- 在线时间
- 75 小时
|
发表于 2021-3-15 16:13:11
|
显示全部楼层
cmsis_arm.cc里有如下说明
/**
  \brief   Wait For Interrupt
  \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.
 */
#define __WFI                             __wfi
/**
  \brief   Wait For Event
  \details Wait For Event is a hint instruction that permits the processor to enter
           a low-power state until one of a number of events occurs.
 */
#define __WFE                             __wfe
什么意思呢?简单的说:
WFI进入则可由任意中断唤醒
WFE进入则由事件唤醒
WFI = wait for interrupt 等待中断,即下一次中断发生前都在此hold住不干活
WFE = wait for event 等待事件,即下一次事件发生前都在此hold住不干活 |
|