m52259demomcu. Flash module. CFMCLKD — CFM Clock Divider Register.

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

m52259demomcu. Flash module. CFMCLKD — CFM Clock Divider Register.

跳至解决方案
1,743 次查看
Zaas
Contributor I

Dear all,

 

    I have the 52259 internal flash divide in differents slices as (boot - F1 - F2). I want to R/W Flash F2 while the application is running in F1.

    I set CFMCLKD and r/w works nice. After that, I want to still execute my application from F1 but I don't know If I should do some special action to recover the flash bus frequency and how do it or it isn't necessary.

Thanks in advanced.
标签 (1)
0 项奖励
1 解答
274 次查看
scifi
Senior Contributor I

Hi Zaas,

 

It is not necessary to do anything special. The register CFMCLKD doesn't set flash bus frequency, it merely configures time base for flash erase/write operations. It is important that those operations are timed properly: too long erase/write could destroy flash cells, while too short one could lead to 'unstable' bits.

When a write or erase operation is performed by code in flash memory, the CPU is stalled for the duration of the operation. It resumes program execution as soon as the operation is complete.

I've created an application similar to yours with a MCF52233. I believe its flash memory is functionally equivalent to that of MCF52259. It works as expected, no special tricks are necessary.

 

Regards,

- mike

在原帖中查看解决方案

0 项奖励
1 回复
275 次查看
scifi
Senior Contributor I

Hi Zaas,

 

It is not necessary to do anything special. The register CFMCLKD doesn't set flash bus frequency, it merely configures time base for flash erase/write operations. It is important that those operations are timed properly: too long erase/write could destroy flash cells, while too short one could lead to 'unstable' bits.

When a write or erase operation is performed by code in flash memory, the CPU is stalled for the duration of the operation. It resumes program execution as soon as the operation is complete.

I've created an application similar to yours with a MCF52233. I believe its flash memory is functionally equivalent to that of MCF52259. It works as expected, no special tricks are necessary.

 

Regards,

- mike

0 项奖励