Technical information
AN2216/D
Appendix A: Flash Memory Protection
MOTOROLA MC9S12DP256 Software Development Using Metrowerkâs Codewarrior 23
Figure 22. Security Bits
Even if the memory security and protection features are not being utilized
during development, a file containing data for this 16 byte area should be
created, compiled and inserted into the linker file for compatibility with some
Flash programming tools. Because of the inability to erase the Flash and
EEPROM using the BDM interface in the first mask set (0K36N) of the
MC9S12DP256, many programming tools automatically program the security
byte with a value of $FE after successfully erasing the Flash. This prevents the
device from accidentally being placed in a secure state if a programming
operation were to fail. Having this block of data included in the object file with
a value of $FE for the security byte will ensure that a verify operation will be
performed properly.
SEC[1:0] Security State
0:0
0:1
1:0
1:1
Secured
Secured
Unsecured
Secured