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.
Solved! Go to Solution.
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
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