...
The following alternative design approaches were considered by this project but then discarded for some reason:
None
...
4.
...
Test Plan
...
4.
...
1. Secure Download Area
The downloadable materials developed by this project are available from a secure Web page on the Emcraft Systems web site. Specifically, proceed to the following URL to download the software materials:
...
Login: CONTACT EMACRFT
Password: CONTACT EMACRFT
...
4.
...
2.
Anchor | ||||
---|---|---|---|---|
|
The following files are available from the secure download area:
linux-lpspi.patch
- patch to the Linux kernel sources;projects-lpspi.patch
- patch to therootfs
project;rootfs.uImage
- prebuilt bootable Linux image;
4.3
...
. Test Set-Up
4.3
...
.1. Hardware Setup
The following hardware setup is required for the i.MX RT 1050 board:
The i.MXRT1050 EVK board.
Micron M25P32 SPI Flash Memory, as a separate chip.
Connect the SPI Flash memory via the "SD TF to TF Flexible Card Extension cable Extender Adapter" attached to the TF Card Slot
J20
. Details of those connection are as follows:
SPI Memory Signal/Function | J20 Pin# | MCU Signal | MCU PAD |
CS#/Chip Select | 5 | LPSPI1_PCS0 | GPIO_SD_B0_01 |
SCLK/Clock Input | 3 | LPSPI1_SCK | GPIO_SD_B0_00 |
SI/Serial Data Input | 7 | LPSPI1_SDO | GPIO_SD_B0_02 |
SO/Serial Data Output | 8 | LPSPI1_SDI | GPIO_SD_B0_03 |
4.3.
...
2. Software Setup
The following software setup is required:
Download the files listed in Section: "Downloadable Files" to the top of the Linux i.MX RT installation.
Install the BSP, as per the respective "Installing and activating cross development environment" document in the "Software" section on the Emcraft site.
From the top of the Linux installation, activate the Linux cross-compile environment by running:
Code Block $ . ACTIVATE.sh
From the top of the BSP installation, go to the Linux kernel tree and install the kernel patch, eg:
Code Block $ cd linux/ $ patch -p1 < ../../linux-lpspi.patch
From the top of the Linux installation, go to the
projects
sub-directory, and patch therootfs
project:Code Block $ cd projects/ $ patch -p1 < ../../projects-lpspi.patch
Build the
rootfs
project:Code Block $ cd projects/rootfs $ make
...
4.
...
4. Detailed Test Plan
...
4.
...
4.1.
Anchor | ||||
---|---|---|---|---|
|
Perform the following step-wise test procedure:
Go to the
projects/rootfs
directory, build the loadable Linux image (rootfs.uImage
) and copy it to the TFTP directory on the host:Code Block $ cd projects/rootfs $ make
Boot the loadable Linux image (
rootfs.uImage
) to the target via TFTP and validate that it boots to the Linux shell:Code Block => run netboot Using ethernet@40424000 device TFTP from server 192.168.1.96; our IP address is 192.168.1.86 Filename 'imxrt1050/rootfs.uImage'. Load address: 0x80007fc0 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ... / # uname Linux / #
...
4.
...
4.2.
Anchor | ||||
---|---|---|---|---|
|
Perform the following step-wise test procedure:
From the Linux shell, run
dmesg
and verify that there are no error messages related to SPI or LPSPI:Code Block / # dmesg ... / # dmesg | grep spi / #
Verify that the
spi0
master is registered in thesysfs
:Code Block / # ls /sys/class/spi_master/ spi0 / #
...
4.
...
4.3.
Anchor | ||||
---|---|---|---|---|
|
Replace the SD card in the SD card slot by the SPI Flash memory
M25P32
using "SD TF to TF Flexible Card Extension cable Extender Adapter".Make sure the
spidev
device exists:Code Block / # ls -l /dev/spidev0.0 crw------- 1 root root 153, 0 Jan 1 00:00 /dev/spidev0.0 / #
Make sure the
spidev_flash
application reads the correct Flash ID over SPI (first 3 bytes must be0x20
0x20
0x16
for theM25P32
Flash connected the IMXRT1050-EVK board):Code Block / # spidev_flash /dev/spidev0.0 response(7): 20 20 16 10 00 00 / #