User's Guide

8
Arad Technologies Ltd. | st. HaMada, Yokneam Elite , 2069206, Israel | www.arad.co.il
3.4.1 Open fault Rx message detection timer.
When byte is received on SPI the system checks if it is a header byte, opens a timer for
next byte receive timeout and initiates the timer. This method prevents the system
from waiting for bytes for a long time.
If no byte is received for a long time (over 200ms) the SPI error byte is updated and
the message is not removed.
3.4.2 Save received Rx byte
Each byte is saved into Rx buffer.
3.4.3 Check checksum
When last byte in the message is received, the checksum is validated.
3.4.4 Update SPI error byte
When checksum is not valid, the SPI error byte is updated and the message is not
parsed.
3.4.5 Parse received SPI message
When checksum is valid, the parsing process is called.
The parsing is done in the main loop in order to handle immediately the received
buffer as an atomic and un-interfered process. When parsing is performed, no reader
event is handled.
3.5 The following figure shows parse message flow. Each of the blocks is described briefly in
the subparagraphs.
The message is old
format?
Parse message
according to old format
Yes
Moudule ID, data or
configuration?
No
Yes
03/12/2017
Ver. 1.00 Evgeni K.
Parse message flow
Extract message format
Parse message
according to new format
EXIT
No
Answer to meter
according to message
type
Write to EEPROM
received data