Chapter 4 Memory

START

Read: FCDIV register

Clock Register

FDIVLD

WrittenSet? Check

yes

 

no

Note: FCDIV needs to

 

 

 

be set after each reset

 

 

 

 

 

 

 

 

Write: FCDIV register

 

 

 

 

 

 

 

Read: FSTAT register

Command

FCBEF

no

Buffer Empty Check

Set?

 

 

 

 

 

 

yes

 

 

 

 

 

 

 

 

 

 

 

Access Error and

FACCERR/FPVIOL

yes

Write: FSTAT register

Protection Violation

Set?

 

Clear FACCERR/FPVIOL 0x30

Check

no

 

 

1.

Write: Flash Block Address

 

 

and Dummy Data

 

 

 

 

 

2.

3.

Write: FCMD register

Erase Verify Command 0x05

Write: FSTAT register

Clear FCBEF 0x80

Read: FSTAT register

Bit Polling for

FCCF

no

Command Completion

Set?

 

 

Check

 

 

 

 

 

 

 

yes

 

 

 

Erase Verify

FBLANK

no

Status

Set?

 

 

 

 

yes

 

 

 

 

EXIT

Flash Block

EXIT

Flash Block

Erased

Not Erased

Figure 4-10. Example Erase Verify Command Flow

4.5.2.2Program Command

The program operation programs a previously erased address in the flash memory using an embedded algorithm. An example flow to execute the program operation is shown in Figure 4-11. The program command write sequence is as follows:

1.Write to an aligned flash block address to start the command write sequence for the program command. The data written is programmed to the address written.

2.Write the program command, 0x20, to the FCMD register.

3.Clear the FCBEF flag in the FSTAT register by writing a 1 to FCBEF to launch the program command.

MCF51QE128 MCU Series Reference Manual, Rev. 3

Freescale Semiconductor

81

Get the latest version from freescale.com

Page 81
Image 81
Freescale Semiconductor MCF51QE128RM manual Program Command