4.5. Reading Resource Data
Card resource data may only be read from cards in the Config state. A card may get to the Config state by one of two different methods. A card enters the Config state in response to the card "winning" the serial isolation protocol and having a CSN assigned. The card also enters the Config state in response to receiving a Wake[CSN] command that matches the card's CSN.
As shown in figure 7, all Plug and Play cards function as if their 72-bit serial identifier and their resource data both come from a single byte-serial device. As stated earlier, the pointer to the byte-serial device is reset in response to any Wake[CSN] command. This implies that if a card enters the Config state directly from Sleep state in response to a Wake[CSN] command, the 9-byte serial identifier must be read first before the card resource data is accessed. The Vendor ID and Unique Serial Number are valid; however, the checksum byte, when read in this way, is not valid. For a card that enters the Config state from the Isolation state (i.e. after the isolation protocol has been run and all 72 bits of the serial identifier have been read), the first read of the Resource Data register will return resource data.
Card resource data is read by first polling the Status register and waiting for bit[0] to be set. When this bit is set it means that one byte of resource data is ready to be read from the Resource Data register. After the Resource Data register is read, the Status register must be polled before reading the next byte of resource data. This process is repeated until all resource data is read. The format of resource data is described in the following section.
The above operation implies that the hardware is responsible for accumulating 8 bits of data in the Resource Data register. When this operation is complete, the status bit[0] is set. When a read is performed on the Resource Data register, the status bit[0] is cleared, eight more bits are accumulated in the Resource Data register, then the status bit[0] is set again.