AN2400 Freescale Semiconductor / Motorola, AN2400 Datasheet - Page 6

no-image

AN2400

Manufacturer Part Number
AN2400
Description
HCS12 NVM Guidelines
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2400/D
6
The command state machine requires a timebase that is derived from the
microcontroller oscillator clock via a programmable prescaler. The oscillator is
used as a clock source so that programming and erasure is independent of
changes in the MCU bus frequency, in low power modes for example. The
prescaler value is configured by the FCLKDIV register for Flash and the
ECLKDIV register for EEPROM. These registers must be written with an
appropriate value before programming or erasure can commence. The value
written to the register is chosen so that the timebase is between 150kHz and
200kHz. A flowchart for determining the correct value is shown in
PRDIV8 and FDIV bits Determination
result in incomplete programming or erasure, or damage to the Flash or
EEPROM due to overstress. Furthermore, the microcontroller bus clock must
be 1MHz or greater during programming or erasure.
FDIVLD – Clock Divider Loaded
PRDIV8 – Prescaler Divide by 8
FDIV[5:0] – Clock Divider Bits
Freescale Semiconductor, Inc.
PRDIV8
For More Information On This Product,
1 = Register has been written since reset.
0 = Register has not been written, program/erase is not possible.
0
0
0
0
0
1
1
1
1
1
FDIV5
Go to: www.freescale.com
HCS12 NVM Guidelines
0
0
0
1
0
0
0
1
FDIV4
Table 1. Clock Divider Values
0
0
0
1
0
0
0
1
FDIV3
0
0
0
1
0
0
0
1
Procedure. An incorrect value can
FDIV2
0
0
0
1
0
0
0
1
FDIV1
0
0
1
1
0
0
1
1
FDIV0
0
1
0
1
0
1
0
1
Figure 7.
MOTOROLA
Prescaler
512
64
16
24
1
2
3
8

Related parts for AN2400