GD32W51x User Manual
799
23.6.7.
Bus width selection
After the host has verified the functional pins on the bus it should change the bus width
configuration.
For MMC, using the SWITCH command (CMD6).The bus width configuration is changed by
writing to the BUS_WIDTH byte in the Modes Segment of the EXT_CSD register (using the
SWITCH command to do so). After power-on or software reset, the contents of the
BUS_WIDTH byte is 0x00. If the host tries to write an invalid value, the BUS_WIDTH byte is
not changed and the SWITCH_ERROR bit is set. This register is write only.
For SD memory, using SET_BUS_WIDTH command (ACMD6) to change the bus width. The
default bus width after power up or GO_IDLE_STATE command (CMD0) is 1 bit.
SET_BUS_WIDTH (ACMD6) is only valid in a transfer state, which means that the bus width
can be changed only after a card is selected by SELECT/DESELECT_CARD (CMD7).
23.6.8.
Protection management
In order to allow the host to protect data against erase or write, three methods for the cards
are supported in the card:
CSD register for card protection (optional)
The entire card may be write protected by setting the permanent or temporary write protect
bits in the CSD. Some cards support write protection of groups of sectors by setting the
WP_GRP_ENABLE bit in the CSD. It is defined in units of WP_GRP_SIZE erase groups as
specified in the CSD. The SET_WRITE_PROT command sets the write protection of the
addressed write protected group, and the CLR_WRITE_PROT command clears the write
protection of the addressed write protected group.
The High Capacity SD Memory Card does not support Write Protection and does not respond
to write protection
commands (CMD28, CMD29 and CMD30).
Write protect switch on the card (SD memory and SD I/O card)
A mechanical sliding tablet on the side of the card will be used by the user to indicate that a
given card is write protected or not. If the sliding tablet is positioned in such a way that the
window is open it means that the card is write protected. If the window is closed the card is
not write protected.
Password card Lock/Unlock Operation
The Password
Card Lock/Unlock protection is described in
.
23.6.9.
Card Lock/Unlock operation
The password protection feature enables the host to lock a card while providing a password,
which later will be used for unlocking the card. The password and its size are kept in a 128-