Does entering WFI mode on iMX6 invalidate cache?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does entering WFI mode on iMX6 invalidate cache?

Jump to solution
1,389 Views
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. 

Labels (1)
Tags (4)
0 Kudos
1 Solution
909 Views
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!

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

View solution in original post

0 Kudos
3 Replies
878 Views
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 Kudos
910 Views
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 Kudos
909 Views
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 Kudos