DS1963S
9 of 37
correctly, both flags are cleared and the ending offset indicates the address of the last byte written to the
scratchpad. Now the master can continue reading and verifying every data byte. After the master has
verified the data, it can send the Copy Scratchpad command. This command must be followed exactly by
the data of the three address registers TA1, TA2 and E/S. The master may obtain the contents of these
registers by reading the scratchpad or derive it from the target address and the amount of data to be
written. As soon as the DS1963S has received these bytes correctly, it will copy the data to the requested
location beginning at the target address.
MEMORY AND SHA FUNCTION COMMANDS
Due to its design as a secure device the DS1963S has to behave differently from other Memory iButtons.
Although the data memory of the DS1963S can be read the same way as any other NV SRAM based
Memory iButton, attempts to read pages 16 and 17, which store the secrets, and page 18, the physical
location of the scratchpad, will result in FFh-bytes rather than real data. The other functions that the
DS1963S shares with regular Memory iButtons are governed by a flag called HIDE. Once this HIDE flag
is cleared these functions behave the same as with other NV SRAM based devices. The HIDE flag is
mainly controlled (set or cleared) by the functions that involve the SHA engine. In order to prevent
scratchpad data from accidentally being exposed, the HIDE flag is automatically set as the parasite-
powered circuit performs a power-on reset whenever the DS1963S returns to a probe point. The HIDE
flag is then cleared by issuing an Erase Scratchpad command, which also erases all the data left in the
scratchpad.
The “Memory and SHA Function Flow Chart” (Figure 7) describes the protocols necessary for accessing
the memory and operating the SHA engine. The communication between master and DS1963S takes
place either at regular speed (default, OD = 0) or at Overdrive Speed (OD = 1). If not explicitly set into
the Overdrive Mode the DS1963S assumes regular speed.
Write Scratchpad Command [0Fh]
HIDE = 0, Target Address range 0000h to 01FFh only
After issuing the write scratchpad command, the master must first provide the 2–byte target address,
followed by the data to be written to the scratchpad. The data will be written to the scratchpad starting at
the byte offset (T4:T0). The ending offset (E4: E0) will be the byte offset at which the master stops
writing data. Only full data bytes are accepted. If the last data byte is incomplete its content will be
ignored and the partial byte flag PF will be set.
When executing the Write Scratchpad command the CRC generator inside the DS1963S (see Figure 12)
calculates a CRC of the entire data stream, starting at the command code and ending at the last data byte
sent by the master. This CRC is generated using the CRC16 polynomial by first clearing the CRC
generator and then shifting in the command code (0FH) of the Write Scratchpad command, the Target
Addresses TA1 and TA2 as supplied by the master and all the data bytes. The master may end the Write
Scratchpad command at any time. However, if the ending offset is 11111b, the master may send 16 read
time slots and will receive the CRC generated by the DS1963S.
HIDE = 1: Target Address range 0200h to 023Fh only
The function of the command is limited to selecting the secret that will be overwritten by the data
currently stored in the scratchpad, which is typically the result of a previously executed Compute First
Secret or Compute Next Secret command. The addresses of the eight secrets are shown in Figure 5. The
address transmitted after the command code may point to anywhere within the address range of the secret.
Following the target address the master may transmit data bytes as if writing to the scratchpad. Once as
many data bytes have been transmitted as would fit into the scratchpad beginning at the specified target