Issues on D-cache and Flash Control buffer

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

Issues on D-cache and Flash Control buffer

880件の閲覧回数
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 返答(返信)

777件の閲覧回数
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 件の賞賛

777件の閲覧回数
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 件の賞賛

777件の閲覧回数
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 件の賞賛