System ACE CompactFlash Solution
DS080 (v3.0) April 7, 2014
49
Product Specification
R
— OBSOLETE — OBSOLETE — OBSOLETE — OBSOLETE —
Once the CompactFlash device is ready to receive a new
command, the following information needs to be written to
the MPU interface:
1.
The sector address or logical block address (LBA) of
the first sector to be transferred should be written to the
following MPU address locations:
-
LBA[7:0] @ MPU byte address 10h
-
LBA[15:8] @ MPU byte address 11h
-
LBA[23:16] @ MPU byte address 12h
-
LBA[27:24] @ MPU byte address 13h (note that
only four bits are used in the most significant LBA
byte)
2.
The number of sectors that will be written should be
loaded into the low byte of the SECCNTCMDREG
register (MPU byte address 14h)
3.
The WriteMemCardData command (04h) should be
written to the high byte of the SECCNTCMDREG
register (MPU byte address 15h)
4.
Reset the CFGJTAG controller by setting the
CFGRESET bit (bit 7) of the CONTROLREG register
(MPU address 18h) to a 1.
Immediately after writing the command to the MPU inter-
face, the CFGJTAG controller should be reset before writing
the sector data to the data buffer.
The control flow process for writing the sector data from the
After all of the required sector data has been written, the
CFGJTAG controller should be taken out of reset and the
CompactFlash lock should be released. This is done by set-
ting the CFGRESET (bit 7) and LOCKREQ (bit 1) bits of the
low byte of the CONTROLREG register (MPU byte address
18h) to a 0, respectively. Note that all requested sector data
should be written to the data buffer in order to avoid a dead-
lock situation with the CompactFlash device.
Figure 29: Write Data Buffer Control Flow Process
Write data word
to buffer
Decrement Data
Count variable
Data Count
equal to 0?
Buffer is written.
Return success.
Yes
No
Wait for Buffer Ready
Write Data Buffer
Initialize Data
Count variable*
*Set Data Count variable equal to
the number of data items in a buffer
(e.g., 16 bytes or 32 words)
Write data bits 7:0 to byte address 40h
Write data bits 15:8 to byte address 41h
(Note that the following conditions must
be valid for a data write to occur to the
CompactFlash data buffer:
1. The data buffer must be ready
2. A single write to byte address 41h
must occur that will cause the entire 16-
bit data register to be written to the
buffer)
DS080_54_051701