
Figure 10. Safety example FMSTR application
Usually, the AIO test is a number of results oscillating between 0x0 and 0x704 (test passed and test in progress).
5.2 Post-build CRC calculation
The post-build CRC calculation can be used in several ways, depending on the IDE's built-in options. In IDEs that do not have the
built-in options, use the SRecord tool.
SRecord is a standalone utility for memory manipulation. This utility and all information about it are available at Peter Miller’s
http://srecord.sourceforge.net/
webpage.
In the SDK package, the SRecord tool is in the
<sdk_pack>/tools/srecord
folder.
In the IEC60730B Safety example, the SRecord tool is used for the post-build CRC calculations in the MCUXpresso and uVision
Keil IDEs.
In the IAR IDE, use the "ielftool" integrated feature.
The SRecord utility is used to calculate the post-build CRC without any changes. In the postbuild, an additional
*.bat
file that uses
the SRecord tool is called.
The invariable memory test can be turned off/on in file
safety_config.h file.
NOTE
5.2.1 Postbuild in IEC60730B safety example
The approach with SRecord is used in the safety examples for the MCUXpresso and uVision Keil IDEs, when the post-build
command calls the
crc-hex.bat
file, which supports the CRC16 and CRC32 calculations.
The
crc-hex.bat
file is in your SDK package, in the
<sdk_package>/middleware/safety_iec60730b/tools/crc
folder.
The complete post-build command, which is used in the safety example to calculate CRC32 in the uVision Keil IDE is as follows:
Post-build CRC calculation
LPC CM0 Safety Example , Rev. 3, 07/2021
NXP Semiconductors
16