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

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

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

Jump to solution
1,728 Views
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.
Labels (1)
0 Kudos
1 Solution
259 Views
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

View solution in original post

0 Kudos
1 Reply
260 Views
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 Kudos