打印

When does a Cortex Mx wake up from "wfi" ? Is it configurable?

[复制链接]
257|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
菊江先生|  楼主 | 2018-9-9 09:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Question about the \"hint\" instruction  - WFI.
The armv7m arch manual (i\'m using DDI0403_B, latest?) says it will come out of the suspended / low-power state if:
• A reset.
• An asynchronous exception at a priority that, if PRIMASK was
exceptions.
Note
The processor ignores the value of PRIMASK in determining
wakeup event.
• If debug is enabled, a debug event.
• An IMPLEMENTATION DEFINED WFI wakeup event.
and I don\'t understand all of it.  
Point 2 above: Say I start clean from reset with minimal setup, and (pseudo code) in my main is      while (true) { _wfi;  / do stuf .. / }  , and I \'ve left all priorities as default after reset, non-configured un-altered.  Are _any  of Cortex non-NMI/non reset exceptions suppose to wake up my main?   i.e, SysTick,  Svc, PendSv ?
How about external exceptions or interrupts that I\'ve may have enabled through NVIC ?
I\'m using a CM4 based chip, and , I may have observed it wrong but it seemed to me that my main does not wake up on a peripheral interrupt, and out of the internal exceptions it wakes up on SysTick and SVC, but not on PendSV (it seems ..)
Can an implementation change which exceptions will wake up the processor which is in sleep by wfi?
The part which says \"implementation defined\" WFI event: will those usually be expected to be specified by the tech ref manual or datasheet for the chip/ SoC? Because, I\'m looking at the manual for this chip and I see no mentioning of the WFI & reference to this Implementation Defined part.
Also, Is it configurable at all, which interrupts / events would cause it to wake up from WFI ...?     (I would want to ask about WFE as well, but I rather sort one out first).
Is actually using / relying on wfi any good at all for relying to wake up your main thread to check what just has happened ..

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

446

主题

447

帖子

0

粉丝