Functional Example for the MMC/SD Module
MOTOROLA
Multimedia Card/Secure Digital Host Controller Module (MMC/SD)
20-47
•
PWD_LEN
—Defines the length of the password in bytes.
•
PWD
—The password (new or currently used, depending on the command).
The following sections list the command sequences to set/reset a password, lock/unlock the card, and force
an erase.
20.7.4.3.1 Setting the Password
1. Select a card (
SELECT/DESELECT_CARD
, CMD7), if not already selected.
2. Define the block length (
SET_BLOCKLEN
, CMD16) to send, given by the 8-bit card
lock/unlock mode (Byte 0 in Table 20-21), the 8-bit PWD_LEN, and the number of bytes
of the new password. When a password replacement is done, the block size must take into
account that both the old and the new passwords are sent with the command.
3. Send
LOCK/UNLOCK
(CMD42) with the appropriate data block size on the data line
including the 16-bit CRC. The data block indicates the mode (SET_PWD = 1), the length
(PWD_LEN), and the password (PWD) itself. When a password replacement is done, the
length value (PWD_LEN) includes the length of both passwords, the old and the new one,
and the PWD field includes the old password (currently used) followed by the new
password.
4. When the password is matched, the new password and its size are saved into the PWD and
PWD_LEN fields, respectively. When the old password sent is not correct in size and/or
content with the expected password, the LOCK_UNLOCK_FAILED error bit is set in the
Card Status Register and the password is not changed.
NOTE:
The password length field (PWD_LEN) indicates whether a password is
currently set. When this field is nonzero, there is a password set and the
card locks itself after power-up. It is possible to lock the card immediately
in the current power session by setting the LOCK_UNLOCK bit (while
setting the password) or sending an additional command for card locking.
20.7.4.3.2 Resetting the Password
1. Select a card (
SELECT/DESELECT_CARD
, CMD7), if not already selected.
2. Define the block length (
SET_BLOCKLEN
, CMD16) to send, given by the 8-bit card
lock/unlock mode (Byte 0 in Table 20-21), the 8-bit PWD_LEN, and the number of bytes
of the current password.
3. Send
LOCK/UNLOCK
(CMD42) with the appropriate data block size on the data line
including the 16-bit CRC. The data block indicates the mode (CLR_PWD = 1), the length
(PWD_LEN), and the password (PWD) itself. The LOCK_UNLOCK bit is ignored.
4. When the password is matched, the PWD field is cleared and PWD_LEN is set to 0. When
the password sent is not correct in size and/or content with the expected password, the
LOCK_UNLOCK_FAILED error bit is set in the Card Status Register and the password is
not changed.
20.7.4.3.3 Locking a Card
1. Select a card (
SELECT/DESELECT_CARD
, CMD7), if not already selected.
2. Define the block length (
SET_BLOCKLEN
, CMD16) to send, given by the 8-bit card
lock/unlock mode (Byte 0 in Table 20-21), the 8-bit PWD_LEN, and the number of bytes
of the current password.
Summary of Contents for DragonBall MC9328MX1
Page 68: ...1 12 MC9328MX1 Reference Manual MOTOROLA Introduction ...
Page 86: ...2 18 MC9328MX1 Reference Manual MOTOROLA Signal Descriptions and Pin Assignments ...
Page 116: ...3 30 MC9328MX1 Reference Manual MOTOROLA Memory Map ...
Page 126: ...4 10 MC9328MX1 Reference Manual MOTOROLA ARM920T Processor ...
Page 160: ...8 8 MC9328MX1 Reference Manual MOTOROLA System Control ...
Page 272: ...13 32 MC9328MX1 Reference Manual MOTOROLA DMA Controller ...
Page 281: ...Programming Model MOTOROLA Watchdog Timer Module 14 9 ...
Page 282: ...14 10 MC9328MX1 Reference Manual MOTOROLA Watchdog Timer Module ...
Page 300: ...15 18 MC9328MX1 Reference Manual MOTOROLA Analog Signal Processor ASP ...
Page 438: ...18 16 MC9328MX1 Reference Manual MOTOROLA Serial Peripheral Interface Modules SPI 1 and SPI 2 ...
Page 478: ...19 40 MC9328MX1 Reference Manual MOTOROLA LCD Controller ...
Page 574: ...21 32 MC9328MX1 Reference Manual MOTOROLA Memory Stick Host Controller MSHC Module ...
Page 598: ...23 16 MC9328MX1 Reference Manual MOTOROLA Real Time Clock RTC ...
Page 670: ...24 72 MC9328MX1 Reference Manual MOTOROLA SDRAM Memory Controller ...
Page 726: ...25 56 MC9328MX1 Reference Manual MOTOROLA SmartCard Interface Module SIM ...
Page 736: ...26 10 MC9328MX1 Reference Manual MOTOROLA General Purpose Timers ...
Page 854: ...29 18 MC9328MX1 Reference Manual MOTOROLA I2C Module ...
Page 900: ...30 46 MC9328MX1 Reference Manual MOTOROLA Synchronous Serial Interface SSI ...
Page 942: ...32 26 MC9328MX1 Reference Manual MOTOROLA GPIO Module and I O Multiplexer IOMUX ...