GD32F403xx User Manual
541
Reset the password
⚫
Select a card (CMD7), if not previously selected.
⚫
Define the block length (CMD16), given by the 8-bit card lock/unlock mode, the 8-bit
password size (in bytes), and the number of bytes of the currently used password.
⚫
Send the card lock/unlock command with the appropriate data block size on the data line
including the 16-bit CRC. The data block shall indicate the mode CLR_PWD, the length
(PWDS_LEN), and the password itself. If the PWD and PWD_LEN content match the
sent password and its size, then the content of the PWD register is cleared and
PWD_LEN is set to 0. If the password is not correct, then the LOCK_UNLOCK_FAILED
error bit will be set in the status register.
Locking a card
⚫
Select a card (CMD7), if not previously selected.
⚫
Define the block length (CMD16), given by the 8-bit card lock/unlock mode, the 8-bit
password size (in bytes), and the number of bytes of the currently used password.
⚫
Send the card lock/unlock command with the appropriate data block size on the data line
including the 16-bit CRC. The data block shall indicate the mode LOCK, the length
(PWDS_LEN) and the password itself.
If the PWD content is equal to the sent password, then the card will be lock ed and the card-
locked status bit will be set in the status register. If the password is not correct, then the
LOCK_UNLOCK_FAILED error bit will be set in the status register.
Unlocking the card
⚫
Select a card (CMD7), if not previously selected.
⚫
Def ine the block length (CMD16), given by the 8-bit card lock/unlock mode, the 8-bit
password size (in bytes), and the number of bytes of the currently used password.
⚫
Send the card lock/unlock command with the appropriate data block size on the data line
including the 16-bit CRC. The data block shall indicate the mode UNLOCK, the length
(PWDS_LEN) and the password itself.
If the PWD content is equal to the sent password, then the card will be unlocked and the card-
locked
status bit will be cleared in the status register. If the password is not correct, then the
LOCK_UNLOCK_FAILED error bit will be set in the status register.
20.7.
Specific operations
20.7.1.
SD I/O specific operations
The SD I/O only card and SD I/O combo card support these specific operations: