Does entering WFI mode on iMX6 invalidate cache?

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

Does entering WFI mode on iMX6 invalidate cache?

ソリューションへジャンプ
2,203件の閲覧回数
nathanpalmer
Contributor IV

I am wondering if I need to flush/invalidate data cache and invalidate instruction cache before calling the WFI instruction (using WAIT_MODE not STOP_MODE) on the iMX6SL. 

ラベル(1)
タグ(4)
0 件の賞賛
返信
1 解決策
1,723件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Nathan

there is no need to flush/invalidate caches. WFI just disables

core clock.

ARM Information Center

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,692件の閲覧回数
Ahlan
Contributor III

My experience with the iMXRT1064 is that the instruction cache is corrupted whilst in WFI.

I don't think it is supposed to, so I currently consider this to be a processor bug.

In our system we issue a WFI in the background task. If the cache is enabled then when awoken from WFI we get a hard fault (IACCVIOL) when the processor attempts to execute from a non-existent address.

Our solution is to disable the I-cache before the WFI instruction and then to invalidate and reenable the cache when task switching away from the background task.

This seems to work.

Other solutions are either not to use WFI or disable the instruction cache.

0 件の賞賛
返信
1,724件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Nathan

there is no need to flush/invalidate caches. WFI just disables

core clock.

ARM Information Center

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,723件の閲覧回数
nathanpalmer
Contributor IV

Thanks, that's what I thought.   I am having a problem with the system randomly hanging and I just noticed that when I cleaned the cache before WFI then the system does not hang up.

0 件の賞賛
返信