
6.2 Clock test
The clock test procedure tests the oscilator frequency for the CPU core in the wrong frequency condition.
The default clock setting from the SDK library is used in the example. For a real application, ensure that the
reference clock source is not dependent on the primary (tested) clock.
NOTE
6.3 CPU register
The CPU register test procedure tests all CPU registers for the stuck-at condition (except for the program counter register). The
program counter test is implemented as a stand-alone safety routine.
Some tests stay in an endless loop in case of an error, others return a corresponding error message.
6.4 DIO test
The Digital Input/Output (DIO) test procedure performs the plausibility check of the processor's digital IO interface.
Make sure that the time between the "set" and "get" functions is sufficient for the GPIO peripheral speed.
NOTE
6.5 Invariable memory test
The invariable (Flash) memory test provides a CRC check of a dedicated part of memory. This test can be turned off in the
safety_config.h
file.
The test consists of the following two parts:
• Post-build CRC calculation of the dedicated memory.
• Runtime CRC calculation and comparison with the post-build result.
The post-build calculation is different for each IDE:
In the IAR IDE, the CRC is calculated by the IDE directly using the linker (see Options->Build Action). The Flash test is fully
integrated to the example project in the IAR IDE. It is necessary only to turn this test on in the
safety_config.h
file.
In the uVision Keil IDE, the CRC is calculated by the Srecord third-party tool, which is called from the IDE (see Options → User
→ After Build) The Flash test is fully integrated to the example project in the uVison Keil IDE. It is only necessary to turn this test
on in the
safety_config.h
file. In case of any issues, see
Arm uVison Keil IDE postbuild CRC
In the MCUXpresso IDE, the CRC is calculated by the Srecord third-party tool. The user must do some additional steps. For more
information, see
The invariable memory test example uses the
crc.bat file for post-build calculation, so this example does not work
on a Unix/Mac operating system.
NOTE
When you debug your application with the Flash test turned on, be careful when using the breakpoint. The software
breakpoint usually changes the CRC result and causes a safety error.
NOTE
6.6 Variable memory test
The variable memory on the supported MCU is an on-chip RAM.
The RAM memory test is provided by the MarchC or MarchX tests.
Clock test
LPC CM0 Safety Example , Rev. 3, 07/2021
NXP Semiconductors
25