Kinetis sleep enable/disable

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

Kinetis sleep enable/disable

ソリューションへジャンプ
1,671件の閲覧回数
martindusek
Contributor V

Hello,

is there any HW control of sleep mode enable/disable in Kinetis K MCUs? I can see SMC->PMPROT register, but it is writable only once after reset.

Using a variable, setting it true or false and then checking before sleep mode entry is not an option as there is a need to disable sleep mode when an asynchronous (interrupt) event occurs.

ラベル(1)
タグ(1)
1 解決策
1,344件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Martin,

Thanks for the clarification! Kinetis devices execute the "WFI" instruction to enter low power modes, but WFI is a conditional instruction, so you may define a macro for this instruction with a condition, and change the condition to FAIL in the ISR which happens right before this intruction, so that this instruction does not execute at all in such case. Please kindly refer to the following for more details.

1.png

2.png

Hope that helps,


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

3 返答(返信)
1,344件の閲覧回数
martindusek
Contributor V

Hello,

sorry not to be more specific.

Yes I want to disable sleep mode in ISR which can occur just before sleep mode entry instruction. I think only HW based sleep mode disable can handle this.

0 件の賞賛
返信
1,345件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Martin,

Thanks for the clarification! Kinetis devices execute the "WFI" instruction to enter low power modes, but WFI is a conditional instruction, so you may define a macro for this instruction with a condition, and change the condition to FAIL in the ISR which happens right before this intruction, so that this instruction does not execute at all in such case. Please kindly refer to the following for more details.

1.png

2.png

Hope that helps,


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,344件の閲覧回数
miduo
NXP Employee
NXP Employee

Hi,

I am not quite understand what you really would like to do? Why  "here is a need to disable sleep mode when an asynchronous (interrupt) event occurs."? If more information provide, it will much helpful.

0 件の賞賛
返信