
Siemens
Product Manual R0008
Semiconductor Group
29
3.1
7
Error handling
The R0008 is defined as an error free device. To protect the data against errors generated during
the transport over the MultiMediaCard bus dynamically, an additional feature is implemented: The
cyclic redundancy check (CRC).
7.1
CRC
Following the MultiMediaCard standard, the R0008 uses two different CRC codes to protect the
data and the command/response transfer between card and host. The CRC is intended only to
detect transfer errors and not to correct them “on the fly”. If a CRC error is detected the host has to
react. This is normally done by repeating the last command.
The first CRC code is intended to protect the command and response frames. They are also used to
synchronize the data stream. This CRC is generated with and checked against the following polyno-
mial:
CRC polynomial: G(x) = x
7
+ x
3
+ 1
M(x) = (start bit) * x
39
+...+ (last bit) * x
0
CRC[6...0] = Remainder [(M(x) * x
7
) / G(x)]
One CRC is checked in the R0008 for every command. For each response a CRC is generated in
the R0008. On CRC failure the command will be ignored and a response is sent to initiate a repeti-
tion of the command by the host. Each data block read from the R0008 will be succeeded by redun-
dancy bits generated with the second CRC. The code is usable for payload lengths of up to 2048
Bytes:
CRC polynomial:
G(x) = x
16
+ x
12
+x
5
+ 1,
M(x) = (start bit) * x
n
+ x
n-1
+...+ (last bit) * x
0
, with n
<
2048
8
CRC[15...0] = Remainder [(M(x) * x
16
) / G(x)]
7.2
On card error correction
The R0008 includes a error correction unit which detects and corrects card internal errors. The cor-
rection is done just in time, when the data is read out. The correction is done by piping the data
through the ECC unit, so that no detectable speed down is induced. The complete ECC is covered
for the user, so that he must not care about handling statical errors in the device.