"KEAZN64M", (WFI Command not working ) IAR Compiler

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

"KEAZN64M", (WFI Command not working ) IAR Compiler

972件の閲覧回数
mohammedaboelna
Contributor III

1- How can I make sure that the "WFI" command is working and the MCU enters the wait "low power" mode ? I mean is there a certain register i can watch to check that I'm in the wait mood ?
2- How can i go out of the wait mode using KBI interrupt noting that before entering the Wait mode the interrupts are disabled and PRIMASK.PM is set to 1 ? 
Hint
This is the Macro i used to define the wait instruction 
 
#define WAIT_FOR_INTERRUPTS()  asm("wfi")

0 件の賞賛
返信
1 返信

856件の閲覧回数
mjbcswitzerland
Specialist V

Mohammed

1. When in the wait mode the processor 's core will be 'frozen', therefore you can do anything like checking registers. The simplest method is to set a break point after the wfi instruction and if it is hit it means that it has "woken" again.

2. The WAIT state is existed when there are interrupts pending "before the mask" so it is normal and correct to globally disable interrupts before executing the wfi instruction - this will have no effect on the wake-up.

Check also http://www.utasker.com/kinetis/FRDM-KEAZ64Q64.html - the binary there probably has low power tests according to http://www.utasker.com/kinetis/LLWU.html

Regards

Mark

0 件の賞賛
返信