Disable cache on K60F120

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

Disable cache on K60F120

跳至解决方案
1,007 次查看
dev25
Contributor II

Hello,

I am wondering if there is any cache feature in MQX for the Freescale tower K60F120M, and if so, how could I disable it ?

Any help would be grateful,

Best regards,

Camille

标记 (3)
0 项奖励
回复
1 解答
838 次查看
DavidS
NXP Employee
NXP Employee

Hi Camille,

MQX setups the Instruction/Data 8Kbyte caches to default setting in BSP init_bsp.c file as follows:

    /** Cache settings **/

    /* Make sure that cache region settings has correct value(reset value).

    This value allow maximal perfomance settings for cache regions because of some regions are:

    non-cacheable ,non-cacheable and Write-through or non-cacheable and Write-throug or only Write_back*/

    LMEM_PSCRMR = 0xAA0FA000u;

    LMEM_PCCRMR = 0xAA0FA000u;

    /*folowed 2 functions enable caches (instruction and data cache) and invalidate caches*/

    _DCACHE_ENABLE(0);

    _ICACHE_ENABLE(0);

You can change the _DCACHE_ENABLE(0); to _DCACHE_DISABLE(0); .

You can change the _ICACHE_ENABLE(0); to _ICACHE_DISABLE(0); .

The respective macros are defined in kinetis.h header.

Regards,

David

在原帖中查看解决方案

0 项奖励
回复
1 回复
839 次查看
DavidS
NXP Employee
NXP Employee

Hi Camille,

MQX setups the Instruction/Data 8Kbyte caches to default setting in BSP init_bsp.c file as follows:

    /** Cache settings **/

    /* Make sure that cache region settings has correct value(reset value).

    This value allow maximal perfomance settings for cache regions because of some regions are:

    non-cacheable ,non-cacheable and Write-through or non-cacheable and Write-throug or only Write_back*/

    LMEM_PSCRMR = 0xAA0FA000u;

    LMEM_PCCRMR = 0xAA0FA000u;

    /*folowed 2 functions enable caches (instruction and data cache) and invalidate caches*/

    _DCACHE_ENABLE(0);

    _ICACHE_ENABLE(0);

You can change the _DCACHE_ENABLE(0); to _DCACHE_DISABLE(0); .

You can change the _ICACHE_ENABLE(0); to _ICACHE_DISABLE(0); .

The respective macros are defined in kinetis.h header.

Regards,

David

0 项奖励
回复