Issues on D-cache and Flash Control buffer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Issues on D-cache and Flash Control buffer

1,712 次查看
qm1013
Contributor III

hello, when I want to handle the flash (such as reading ,writing and erasing) , I should disable D -cache and flash controller buffer . 

If I don't enable the D-cache and flash controller buffer after manipulating the flash, will it make a big difference on the performance of the MCU ?

What effect would the MCU have without d-cache and flash controller buffer enable ?

TIM截图20190722095523.jpg

Regards,

Meng

标签 (1)
标记 (3)
0 项奖励
回复
3 回复数

1,609 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Meng,

this is not about performance, it's about data coherency.

Example: let's assume that some data from a flash block are already cached. When you erase the block now, cache memory is not informed about that, it still contains previous cached data, so you will read incorrect data now. It would be necessary to invalidate the cache after each flash operation or you can set that area as cache inhibited.

Regards,

Lukas

0 项奖励
回复

1,609 次查看
qm1013
Contributor III

Hi, Lukas, 

I am afraid that you misunderstood the meaning of my words.

When I don't manipulate the flash , I disable the D-cache and flash controller cache .Which means in the normal instruction execution , the D-cache and flash controller cache are disable. Will it effect the MCU ? 

I think that in the normal instruction execution , the disabled cache will have some influence on the MCU , maybe the efficiency of instruction execution will go down. Am I right ?

Regards,

Meng

0 项奖励
回复

1,609 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

I'm sorry, too fast reading...

Yes, sure, the performance can go down. I don't want to give you an estimation. It is highly dependent on application. I usually recommend to test it - for example, use a timer to measure some critical sections of your code or toggle GPIO before/after...

Regards,

Lukas

0 项奖励
回复