
env save
reset
• The bootlader is now located in the eMMC memory and set to boot automatically from the QSPI flash after the reset.
• Run the "fastboot usb" command (the device will wait for an input on the USB port).
• Build the project in the IAR IDE (press the "F7" key). The output is the
example\boards\<your_board>\demo_apps\safety_iec60730b\iar\debug_flash\Exe\dev_safety_iec60730b.bin
file.
• Download the built image into the QSPI flash: Navigate to the
<PACKAGE_DIR>\example\boards\<your_board>\demo_apps\safety_iec60730b\iar\
directory in the Windows OS
command prompt.
• Run the "uuu -b qspi uboot_qspi.bin .\debug_flash\Exe\dev_safety_iec60730b.bin" command. Wait a few seconds. The
output of the Windows OS command prompt should look as follows:
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.2.135-0-gacaf035
Success 1 Failure 0
1:11 6/ 6 [Done ] FB: done
• The output of the bootloader terminal should look as follows:
downloading of 18532 bytes finished
SF: Detected n25q256a with page size 256 Bytes, erase size 4 KiB, total 32 MiB
SF: 20480 bytes @ 0x0 Erased: OK
device 0 offset 0x0, size 0x4864
SF: 18532 bytes @ 0x0 Written: OK
• The image is now downloaded into the QSPI flash.
• Turn the board off and back on again.
• Check whether "Hello safety world!" is printed in the serial terminal.
• Debugging from the IAR IDE is possible only in the Attach mode (debugging without downloading).
4.3 Example settings - safety_config.h
The main example settings header file is
safety_config.h
. The neccessary macros for the safety example are defined in this file.
The "switch macros", which enable the user to turn off the calling of the safety test, are defined in the beginning. When starting,
turn off the FLASH test and the WDOG test. On LPC devices, turn off also the Clock test.
/* This macro enables infinity while loop in the SafetyErrorHandling() function */
#define SAFETY_ERROR_ACTION 1
/* TEST SWITCHES - for debugging, it is better to turn the FLASH and WDOG tests OFF. */
#define ADC_TEST_ENABLED 1
#define CLOCK_TEST_ENABLED 1
#define DIO_TEST_ENABLED 1
#define FLASH_TEST_ENABLED 1
#define RAM_TEST_ENABLED 1
Example settings - safety_config.h
i.MX8M Safety Example , Rev. 3, 07/2021
NXP Semiconductors
12