arm sleep mode entry and exit differences WFE, WFI

大城市里の小女人 提交于 2019-12-04 02:47:36

The primary mechanism for wake that you'll see on a Cortex-M is an interrupt, hence WFI (wait for interrupt). On all of the implementations that I've seen that results in clock-gating the core, although deeper sleep/higher latency modes are sometimes available if the design supports it.

WFE is more relevant in multi-processor designs.

With regard to the questions - 1. Interrupts and System Handlers are very similar in the Cortex-M, differing primarily by how they are triggered. The architecture distinguishes between them, but in practice they are the same.

Are for your bit tables, they don't really make sense. Each Cortex-M implementation has it's own interpretation of what happens during WFI. It can vary from basic clock gating to deep-sleep modes. Consult your microprocessor documentation for the real story.

PRIMASK doesn't affect wake from sleep behavior.

My answer your question about the different between WFI and WFE is based on ARM Cortex-A9 MPcore, please take a look at this link ARM cortex-a9 MPcore TRM.

Basically, there are four CPU modes run mode, standby mode, dormant mode, shutdown mode.

The differences for WFI and WFE are the way to bring CPU to run mode.

WFE can works with the execution of an SEV instruction on any processor in the multiprocessor system, and also works with an assertion of the EVENTI input signal.

WFI doesn't have these two.

Also the way they handle the causes.

WFI must work with IRQ_Handler, WFE doesn't have to.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!