Embedded Artists
We are the leading providers of products and services around prototyping, evaluation and OEM platforms using NXP's ARM-based microcontrollers.
You are viewing an older revision! See the latest version
LPC4088DM Performance
Data/File Performance¶
The display modules have several different options when it comes to storing files/data:
| Destination | Size | Cost |
|---|---|---|
| uSD Cards | Depends, typically >2Gb | Depends on size |
| USB MemoryStick | Depends, typically >16Gb | Depends on size |
| QSPI File System | Configurable 1-16Mb | Free |
| Arrays in QSPI | Max 16 Mb | Free |
| Arrays in internal flash | Max 512Kb | Free |
As the display modules comes with 16Mb external QSPI flash and the LPC4088 MCU has 512Kb of internal flash those memories can be used without adding any extra costs. If the storage requirements are greater then external removable memories (USB MemorySticks or uSD cards) can be bought and plugged in.
Reading¶
The following summary shows the read performance of each of the different memories. Files of different sizes are read into a large buffer in external SDRAM and the total time is recorded. For comparison the files are also available as arrays in internal flash (IFLASH[]) and external QSPI flash (QSPI[]).
----
Summary:
File Information
Filename Size
-------- ----
bench_600.bmp 623 bytes
bench_10k.bmp 9703 bytes
bench_100k.bmp 129040 bytes
bench_350k.bmp 375959 bytes
bench_1m.bmp 920339 bytes
bench_4m.bmp 3701897 bytes
Read times (in us)
Filename uSD Card USB QSPI FS IFLASH[] QSPI[]
-------- -------- --- ------- -------- ------
bench_600.bmp 1998 23916 1862 9 40
bench_10k.bmp 8340 125333 2554 118 656
bench_100k.bmp 96314 1535869 11652 3101 8696
bench_350k.bmp 268215 4427903 30466 N/A 22780
bench_1m.bmp 654990 10799233 71937 N/A 65376
bench_4m.bmp 2633862 43409273 283842 N/A 224272
Read speeds
Filename uSD Card USB QSPI FS IFLASH[] QSPI[]
-------- ------------ ------------ ------------ ------------ ------------
bench_600.bmp 304.50 Kb/s 25.44 Kb/s 326.74 Kb/s 66.02 Mb/s 14.85 Mb/s
bench_10k.bmp 1136.16 Kb/s 75.60 Kb/s 3710.10 Kb/s 78.42 Mb/s 14.11 Mb/s
bench_100k.bmp 1308.38 Kb/s 82.05 Kb/s 10.56 Mb/s 39.68 Mb/s 14.15 Mb/s
bench_350k.bmp 1368.86 Kb/s 82.92 Kb/s 11.77 Mb/s N/A 15.74 Mb/s
bench_1m.bmp 1372.19 Kb/s 83.23 Kb/s 12.20 Mb/s N/A 13.43 Mb/s
bench_4m.bmp 1372.56 Kb/s 83.28 Kb/s 12.44 Mb/s N/A 15.74 Mb/s
---
Some notes:
- The IFLASH[] and QSPI[] columns show direct memcpy from that memory to the destination buffer and has no overhead of a file system or by being read in small chunks as is done in a FAT file system.
- The lower performance of the small files is likely due to the fact that the file system overhead for opening a file is constant and independent of the size of the file. So smaller files get a relatively larger overhead.
- The USB read times are very low with the USBHost stack in mbed. The performance is almost identical on the original 1768 mbed platform. A test (not show here) of the non-mbed libusb stack available in [[|LPCOpen]] shows that the libusb stack is 1.5 - 5.5 times faster.
Writing¶
The following summary shows the write performance of each of the different memories. The source data is read into external SDRAM and then written to the destination file. Only the file operations are timed.
----
Summary:
File Information
Filename Size
-------- ----
bench_600.bmp 623 bytes
bench_10k.bmp 9703 bytes
bench_100k.bmp 129040 bytes
bench_350k.bmp 375959 bytes
bench_1m.bmp 920339 bytes
bench_4m.bmp 3701897 bytes
Write times (in us)
Filename uSD Card USB QSPI FS
-------- -------- --- -------
bench_600.bmp 15136 400059 55723
bench_10k.bmp 26183 185175 114838
bench_100k.bmp 90345 1917807 1082966
bench_350k.bmp 250364 5298330 3399382
bench_1m.bmp 591573 13282119 6368029
bench_4m.bmp 2182433 53461098 25471267
Write speeds
Filename uSD Card USB QSPI FS
-------- ------------ ------------ ------------
bench_600.bmp 40.20 Kb/s 1557.27 b/s 10.92 Kb/s
bench_10k.bmp 361.90 Kb/s 51.17 Kb/s 82.51 Kb/s
bench_100k.bmp 1394.83 Kb/s 65.71 Kb/s 116.36 Kb/s
bench_350k.bmp 1466.45 Kb/s 69.29 Kb/s 108.00 Kb/s
bench_1m.bmp 1519.29 Kb/s 67.67 Kb/s 141.14 Kb/s
bench_4m.bmp 1656.47 Kb/s 67.62 Kb/s 141.93 Kb/s
---
Some notes:
- The uSD card is by far the fastest medium to write to.
- QSPI flash is slow to write to but that is expected. The strength of the QSPI flash is in the fast read speeds.
- The USB write times are a bit slower than the USB read times.
- The lower performance of the small files is likely due to the fact that the file system overhead for opening a file is constant and independent of the size of the file. So smaller files get a relatively larger overhead.
Software¶
The program used to do the tests can be downloaded here:
Import programlpc4088_displaymodule_benchmark
Program to benchmark the speed of the different file system options versus placing data directly into arrays.
The program has two large files image_data.c and image_data_qspi.c which are placed in internal flash and external QSPI flash respectively. The image_data files contains the test files as c arrays like this:
const unsigned char img_bench_100k[] IMAGE_LOCATION = {
0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x01, 0x2C, 0x01
...
0x28, 0x00, 0xA2, 0x8A, 0x28, 0x00, 0xA2, 0x8A, 0x28, 0x00, 0xA2, 0x8A, 0x28, 0x03, 0xFF, 0xD9, 0x00
};
const unsigned int img_size_bench_100k IMAGE_LOCATION = sizeof(img_bench_100k);
The img2c.py script was used to convert the test files into arrays.
In runtime the program starts by saving the data in the arrays as files on each of the three supported file systems. When all file systems are prepared each file/array is read and timed and the result is then summarized as shown above.
After the read tests the user is asked to press the USER button on the display module to run the write tests. This is to allow running the read tests multiple times without constantly having to rewrite the file system (as that could degrade it over time). Before the write tests the existing files (if any) are deleted and the QSPI file system is reformatted so that no performance is gained by writing the same file to the same spot again.
Note
The read/write tests do NOT format the USB memory stick or uSD card during tests. Some test files are added but that is all.
