AN2153 Freescale Semiconductor / Motorola, AN2153 Datasheet - Page 10

no-image

AN2153

Manufacturer Part Number
AN2153
Description
A Serial Bootloader for Reprogramming the MC9S12DP256 FLASH Memory
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
FLASH Program
and Erase
Overview
10
operating in single-chip mode, the key would typically be provided to the
firmware through one of the on-chip serial ports. In addition, back door
security bypass must be enabled by leaving the most significant bit of the
Security byte at $FF0F erased. To disable the back door security bypass
feature, this bit should be programmed to zero.
Once the application receives the 64-bit key, it must set the KEYACC bit
in the FCNFG register. After setting the KEYACC bit, the firmware must
write the received 64-bit key to the security back door comparison key
memory locations ($FF00–$FF07) as four 16-bit words, in sequential
order. Finally, the KEYACC bit must be cleared. If all four 16-bit words
written to the comparison key memory area matched the corresponding
values stored in FLASH, the MCU will be unsecured by forcing the
SEC[1:0] bits in the FSEC register to the unsecured state. Note that this
operation only temporarily disables the device security. The next time
the MCU is reset, the SEC[1:0] bits will be loaded from the security byte
at $FF0F
All FLASH program and erase timings are handled by a hardware state
machine, freeing the CPU to perform other tasks during these
operations. The timebase for the state machine is derived from the
oscillator clock via a programmable down counter. Program and erase
operations are accomplished by writing values to the FCMD register.
Four commands are recognized in the current implementation and are
summarized in
Command
Freescale Semiconductor, Inc.
Other
For More Information On This Product,
$20
$40
$41
$05
Figure 6. FLASH Program and Erase Commands
Go to: www.freescale.com
Memory program
Sector erase
Mass erase
Erase verify
Illegal
Figure
Operation
6.
Program 1 aligned word, 2 bytes
Erase a 512-byte sector
Erase a 64-Kbyte block
Verify erasure of a 64-Kbyte block
Generate an access error
Description
MOTOROLA
AN2153

Related parts for AN2153