Hi,
I am trying to program the Dflash area of the MC56F84789 which is also called Secondary (boot) program data flash.
But the FDPROT reg. = 0x00 what means that "Data Flash region is protected". I have tried to simply write to the register but the value read back is always 0x00.
What am I doing wrong?
In case of writing and reading in to the FSTAT and FPROT everything is OK.
And to mention it is done in debug mode.
BR,
Jozef
Hi Jozef
The address for FDPROT register is 0x1C797 (byte address) in MC56F84789, it is mapped in data memory.
During the reset sequence, the FDPROT register is loaded with the contents of the data flash
protection byte in the Flash Configuration Field located in program flash memory.
In NVM Normal mode, the protection can only be increased, meaning that currently unprotected memory can be protected but currently protected memory cannot be unprotected.
Hope this helps! If not, please attach a simple example project to help us reproduce the problem.
Fiona Kuang
Technical Information & Commercial Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Fiona,
now I can read the FDPROT register. And also I am able to increase the protection. But I need to be able also
temporarily decrease the protection and this is not working. In RM there is :
In NVM Special mode: All bits of FPROT are writable without restriction. Unprotected areas can be
protected and protected areas can be unprotected.
How can I enter this NVM special mode?
The NVM special mode is not a published mode of operation, as it is used only in the Factory to install flash parameters.
If your documentation refers to this mode, please access the latest revision our www.freescale.com.
Hi John,
How can I verify if the flash memory is programmed correctly when the FSEC register is set to secure the device?
Reading flash without power-off/on after programming act like the flash is blank... only 0xFF is read back.
And if I make power-off/on the device, it is already secured and I can not verify the flash memory content.
You can wirte a program to output the contents of flash to a parallel port.
Of course, you would not want to do this in the real application.
In the real application, use a CRC polynomial to check the flash contents.
If this is not secure enought, envelope it so you have two nested checks, and so forth.
The NVM special mode is for factory only.