Memory Check Function
Section 3-2
3-4
3-2
Memory Check Function
By adding a check code to the data in the Tag, you can detect data errors
due to the Tag memory (EEPROM) being overwritten, service life, and
unforeseen factors. The check code uses the CRC code of the generating
polynomial X
16
+ X
12
+ X
5
+ 1.
A memory check is performed using the Memory Check Command (MC),
which writes the check code, and the Memory Calculation Command (MK),
which verifies the check code. In the check block defined using the header
page and the number of pages, the target calculation area is the area except
for the last page of the block, and the last page is the check code area. The
check code uses two bytes in the check code area.
When a check code write command is sent, the CRC code for the data in the
target calculation area is calculated, and written to the check code area.
When the data verification command is sent, the CRC code for the data in
the target calculation area is calculated, and compared with the data in the
check code area. If these match, the number 75 is returned to the completion
code to show that the data is normal. If they do not match, the number 76 is
returned to show that there is a data error.
Example: Memory check is performed when check block header page is 00,
and number of check blocks is 0B.
Check block header page
Usage
After writing the data, calculate and write the check code using the Memory
Check Command (MC), and before reading the data, verify the check code
using the Memory Calculation Command (MK). You can detect data
corruption in advance within the Tags that are not being accessed.
Write stage
Read stage
Check code
calculation target area
(check block header
page -1)
Check code area
00
01
09
0A
Write data
Calculate check code
Verify check code
Read data