
13-16
MCF5249UM
MOTOROLA
FlashMedia Interface
13.4.5
FLASHMEDIA INTERFACE OPERATION IN MEMORYSTICK MODE
Before any data exchange is possible with the MemoryStick, the FLASHMEDIACONFIG register must be
written to set up the clock and the card type. After this, the card is accessed by issuing one of three
possible command sequences. Each new command sent to the card, must toggle the BS line going out.
The “handshake” phase of the MemoryStick can be implemented as a 16-bit read. There is no specific
handshake command.
Note: The FlashMedia interface can handle two MemoryStick cards. One is attached to
the primary interface, the other to the secondary interface. There is one potential
issue. If there is a buffer full or a buffer empty on one interface, the system will
freeze the outgoing SCLK signal, which causes the second interface to go into a
wait-state as well.
Table 13-15 FLASHMEDIA INTERRUPTS
FLASHMEDIAINTSTAT
FLASHMEDIAINTEN
FLASHMEDIAINTCLEAR
BITS
INT NAME
MEANING
RESET
INTERRUPT
ASSOCIATED
INTERRUPT
0
SHIFTBUSY1FALL
interrupt set on falling
edge of shift_busy_1
intClear
60
1
SHIFTBUSY1RISE
interrupt set on rising
edge of shift_busy_1
intClear
60
2
INTLEVEL1FALL
interrupt set on falling
edge of int_level_1
intClear
60
3
INTLEVEL1RISE
interrupt set on rising
edge of int_level_1
intClear
60
4
SHIFTBUSY2FALL
interrupt set on falling
edge of shift_busy_2
intClear
59
5
SHIFTBUSY2RISE
interrupt set on rising
edge of shift_busy_2
intClear
59
6
INTLEVEL2FALL
interrupt set on falling
edge of int_level_2
intClear
59
7
INTLEVEL2RISE
interrupt set on rising
edge of int_level_2
intClear
59
8
RCV1FULL
interrupt set if receive
buffer reg 1 full
read data
58
9
TX1EMPTY
interrupt set if transmit
buffer reg 1 empty
write data
58
10
RCV2FULL
interrupt set if receive
buffer reg 2 full
read data
57
11
TX2EMPTY
interrupt set if transmit
buffer reg 2 empty
write data
57
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.