Pag. 129 di 152
10.6.5 Upgrading the firmware
Two modules, called
loader
and
application
, compose the X3M firmware:
−
The application module contains all the codes enabling the measurement, data logging, display and
communication functions.
−
The loader implements the functions for programming the flash memory containing the firmware and
makes possible its installation and its upgrade.
The X3M firmware is released as binary files whose name has the
x3m
extension. The file name also
contains the version and an identification code of the module (the ID is an abbreviation of the module
name). So, for instance:
−
X3M_DL-02.01.X3M
: file contains the
loader
module, version 2.01;
−
X3M_APP-01.00.X3M
: file contains the
application
module, version 1.00;
−
X3M_DL-02.01;X3M_APP-01.00.X3M
: file containing both modules.
The firmware upgrade is performed using the Modbus protocol through any supported communication
interface (presently RS232 and RS485).
The flash memory access to the firmware area is possible through files FF.00 and FF.01.
File FF.00 supports read only access to the firmware area: by reading this file it is possible to obtain a
copy of the installed firmware (FF.00 contains both the loader and the application module).
FF.01 supports read and write access to a backup area used for software upgrades.
At instrument power on and after each reset, the loader checks (through an algorithm) whether the backup
area contains a valid copy of one of the firmware modules (
loader
and/or
application
).
If the version of one of the modules differs from the one currently installed (as determined by the file
checksum) the loader upgrades the running firmware automatically.
To upgrade a new firmware, therefore, it is sufficient to copy, in the backup area, the content of the binary
file shipped by Electrex and then to power down and restart the instrument.
Before sending the reset command, it is recommended to check that the backup area actually contains a
copy of the new firmware module, so as to prevent possible problems during the file transfer phase. This
check can be done by reading the 00.FF directory.
After resetting the instrument, the upgrade status can be verified ether by checking the outcome string of
the
Report Slave ID
command, or by reading the name of the FF.00 file in the 00.FF directory relating to
the installed modules.
Problems in the file transfer process (to the backup area) will not effect the instrument operations.
However, when writing to file FF.01, all measurement functions are stalled.
The format of FF.00 and FF.01 files is as follows:
Files FF.00 and FF.01 format
Record
Number
Record
Size
Field size
Field type
Field description
Note
1 byte
Unsigned integer
Header size
Fixed value:
equals 2
0
2 bytes
1 byte
Unsigned integer
Data record size
Fixed value:
equals 238
n
(1 <= n <=
1102)
238 bytes
Segment comprising bytes from position
(n-1)*238
to position
n*238-1
of the
binary file (executable) containing the firmware.
Raw data
Содержание X3M
Страница 142: ...Pag 142 di 152 ...
Страница 145: ...Pag 145 di 152 ...
Страница 151: ...Pag 151 di 152 ...