AN2400 Freescale Semiconductor / Motorola, AN2400 Datasheet - Page 8

no-image

AN2400

Manufacturer Part Number
AN2400
Description
HCS12 NVM Guidelines
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2400/D
Flash Status Register
8
NOTE:
CBEIF, PVIOL and ACCER are cleared by writing a ‘1’ to the respective bit.
CCIF, BLANK and bits 3, 1 and 0 are read only (write has no effect).
The Flash Status register is banked on microcontrollers that have multiple
Flash blocks. That is, each Flash block has an independent Flash Status
register but each Flash Status register is accessed at the same address. The
active Block is selected by means of the BKSEL bits in the FCNFG register.
BSET and BCLR instructions should not be used on this register. BSET and
BCLR are ‘read-modify-write’ instructions. This means that the register is read,
the read value is modified by setting or clearing the specified bits, and then the
resulting value is written back to the register. This may result in bits being
cleared unintentionally by the ‘write 1 to clear’ nature of the CBEIF, PVIOL and
ACCERR bits.
The EEPROM Status register has identical bit definitions.
CBEIF — Command Buffer Empty Interrupt Flag
CCIF — Command Complete Interrupt Flag
PVIOL — Protection Violation
The CBEIF flag indicates whether the address, data and command buffers
are empty so that a new command sequence can be started. A command is
launched by writing a ‘1’ to CBEIF (to clear the bit). CBEIE in the
FCNFG/ECNFG register must be set to enable an interrupt request.
The CCIF flag is cleared by hardware when CBEIF is cleared and is
automatically set when all commands have been completed. This flag is
read only. The Flash or EEPROM cannot be read when CCIF is clear. CCIE
in the FCNFG/ECNFG register must be set to enable an interrupt request.
The PVIOL flag indicates that an attempt was made to program or erase a
protected area of Flash or EEPROM. The PVIOL flag must be cleared by
writing a ‘1’ to PVIOL before starting a new command sequence.
Freescale Semiconductor, Inc.
CBEIF
7
For More Information On This Product,
1 = Buffers are ready to accept a new command.
0 = Buffers are full.
1 = All commands completed.
0 = Command in progress.
1 = Protection violation has occurred.
0 = No protection violation.
CCIF
Go to: www.freescale.com
6
HCS12 NVM Guidelines
Figure 8
PVIOL
5
.
Flash Status Register (FSTAT)
ACCERR
4
3
0
BLANK
2
1
0
MOTOROLA
0
0

Related parts for AN2400