E 10210 12 - 2005
Protocols:
MODULAR X6 CCTALK VALIDATOR 50
The Exit module does not have its software correctly loaded
It is requested to read data out of the user zone or the number of bytes to be read is 0.
b)
This command is not available if the Validator is working in “Secure Mode”.
5.31
WRITE DATA BLOCK [214]
Command not available in “Secure Mode”.
Using this command the Machine can write data into the user zone:
Send:
[Dir] [N] [1] [214][Data 1][Data 2] ... [Data M][Chk]
Reply:
[1] [0] [Dir] [0] [Chk]
-> ACK without data
Where
Dir = address of the corresponding Validator
Data 1 = 0, 1: block number to write
Data 2 .. Data M = data to write.
The number of data to write is:
-
1 .. 64 if the write is in the block 0 [Data 1] = 0. If more than 32 bytes are written, the
rest of data are written into the block 1.
-
1 .. 32 if the write is in the block 1: [Data 1] = 1.
Because the microcontroller writes into the Flash memory in blocks of 64 bytes long and with
the aim to reduce the writes number, it is recommended to write 64 bytes at block 0.
A possible method of writing can be the following one
a)
Read the 64 data bytes: command “Read data block”.
[
Dir] [2] [1] [215][block = 0][num. of Bytes = 64] [Chk]
b)
Modify the received data with the new data.
c)
Write the 64 data bytes: command “Write data block”
[Dir] [65] [1] [214][block = 0][Data 1] ... [Data 64][Chk]
The Validator checks the write verifying that the written data are the same as the received
data. The Validator transmits ACK if there is no errors.