Embedded Artists


We are the leading providers of products and services around prototyping, evaluation and OEM platforms using NXP's ARM-based microcontrollers.

LPC4088DM Performance

Data/File Performance

The display modules have several different options when it comes to storing files/data:

DestinationSizeCost
uSD CardsDepends, typically >2GbDepends on size
USB MemoryStickDepends, typically >16GbDepends on size
QSPI File SystemConfigurable 1-16MbFree
Arrays in QSPIMax 16 MbFree
Arrays in internal flashMax 512KbFree

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:

  1. 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.
  2. 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.
  3. 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
            --------       ----
       32x32_red.bmp       3126 bytes
       64x64_red.bmp      12342 bytes
     128x128_red.bmp      49206 bytes
     480x272_red.raw     261130 bytes
     800x480_red.bmp    1152054 bytes

  Write times (in us)
            Filename   uSD Card        USB    QSPI FS
            --------   --------        ---    -------
       32x32_red.bmp      27627     424712      61063
       64x64_red.bmp      63323     215493     153235
     128x128_red.bmp     214769     816096     452264
     480x272_red.raw    2117780    3791545    2441033
     800x480_red.bmp    6659847   16657665    9461806

  Write speeds
            Filename  uSD Card     USB          QSPI FS
            --------  ------------ ------------ ------------
       32x32_red.bmp   110.50 Kb/s 7360.28 b/s    49.99 Kb/s
       64x64_red.bmp   190.34 Kb/s   55.93 Kb/s   78.66 Kb/s
     128x128_red.bmp   223.74 Kb/s   58.88 Kb/s  106.25 Kb/s
     480x272_red.raw   120.41 Kb/s   67.26 Kb/s  104.47 Kb/s
     800x480_red.bmp   168.93 Kb/s   67.54 Kb/s  118.90 Kb/s

---

Some notes:

  1. There is a limitation (see here) when writing to uSD cards so the speed is lower than expected.
  2. QSPI flash is slow to write to but that is expected. The strength of the QSPI flash is in the fast read speeds.
  3. The USB write times are a bit slower than the USB read times.
  4. 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.

Image Decoding

Images are required to have a nice looking GUI and the images must be loaded from somewhere. The read benchmarks above shows which media to load from but there is one more important factor and that is the file format. The Using Images page describes the three currently supported formats: BMP, PNG and RAW.

So which format should you use? The benchmark program tested a set of images (one single color image _red and a photo _flower) in different resolutions on different media. This is the result:

----
Summary:

  File Information
            Filename       Size
            --------       ----
       32x32_red.bmp       3126 bytes
       32x32_red.png        102 bytes
       32x32_red.raw       2058 bytes
       64x64_red.bmp      12342 bytes
       64x64_red.png        157 bytes
       64x64_red.raw       8202 bytes
     128x128_red.bmp      49206 bytes
     128x128_red.png        361 bytes
     128x128_red.raw      32778 bytes
     480x272_red.bmp     391734 bytes
     480x272_red.png       1043 bytes
     480x272_red.raw     261130 bytes
     800x480_red.bmp    1152054 bytes
     800x480_red.png       2252 bytes
     800x480_red.raw     768010 bytes
   32x32_flowers.bmp       3126 bytes
   32x32_flowers.png       1828 bytes
   32x32_flowers.raw       2058 bytes
   64x64_flowers.bmp      12342 bytes
   64x64_flowers.png       7724 bytes
   64x64_flowers.raw       8202 bytes
 128x128_flowers.bmp      49206 bytes
 128x128_flowers.png      29401 bytes
 128x128_flowers.raw      32778 bytes
 480x272_flowers.bmp     391734 bytes
 480x272_flowers.png     229045 bytes
 480x272_flowers.raw     261130 bytes
 800x480_flowers.bmp    1152054 bytes
 800x480_flowers.png     684858 bytes
 800x480_flowers.raw     768010 bytes

  Decode times (in us)
            Filename   uSD Card        USB    QSPI FS   IFLASH[]     QSPI[]
            --------   --------        ---    -------   --------     ------
       32x32_red.bmp       2620     105283       2294        274        375
       32x32_red.png       9674      18198      10220       8366       8367
       32x32_red.raw       2284      44131       1977         45        133
       64x64_red.bmp       9667     174419       8915       1046       1446
       64x64_red.png      25289      30164      16253      14379      14384
       64x64_red.raw       7332     116697       2375        158        507
     128x128_red.bmp      21588     609267      16044        N/A      10611
     128x128_red.png      47836      57046      43584        N/A      45753
     128x128_red.raw      12236     404156       4049        N/A       7066
     480x272_red.bmp     120634    4670883      81710        N/A      52582
     480x272_red.png     290508     320745     289435        N/A     291543
     480x272_red.raw      43291    3092721      24078        N/A      25130
     800x480_red.bmp     326342   13677893     227446        N/A     137682
     800x480_red.png     897776     939718     896456        N/A     886063
     800x480_red.raw     121896    9038684      58067        N/A      55297
   32x32_flowers.bmp       8916      68698       2439        274        406
   32x32_flowers.png      27479      61194      15155      13060      13159
   32x32_flowers.raw       8994      56003       2121         46        133
   64x64_flowers.bmp      17734     183202       9061       1041       1419
   64x64_flowers.png      58206     166791      45549      36842      37276
   64x64_flowers.raw      10515     134193       2521        158        524
 128x128_flowers.bmp      31417     624272      16191        N/A      10608
 128x128_flowers.png     141478     506922     135335        N/A     134931
 128x128_flowers.raw      10547     422245       4198        N/A       6997
 480x272_flowers.bmp     125562    4682875      81846        N/A      52691
 480x272_flowers.png    1041199    3729228    1019227        N/A    1001145
 480x272_flowers.raw      45133    3110041      24238        N/A      24588
 800x480_flowers.bmp     327642   13693976     227594        N/A     137652
 800x480_flowers.png    3114421   11073223    3053530        N/A    2996990
 800x480_flowers.raw     126367    9050924      58258        N/A      61716

  Decode speeds
            Filename  uSD Card     USB          QSPI FS      IFLASH[]     QSPI[]
            --------  ------------ ------------ ------------ ------------ ------------
       32x32_red.bmp  1165.17 Kb/s   29.00 Kb/s 1330.75 Kb/s   10.88 Mb/s 8140.62 Kb/s
       32x32_red.png    10.30 Kb/s 5605.01 b/s  9980.43 b/s    11.91 Kb/s   11.91 Kb/s
       32x32_red.raw   879.93 Kb/s   45.54 Kb/s 1016.57 Kb/s   43.61 Mb/s   14.76 Mb/s
       64x64_red.bmp  1246.79 Kb/s   69.10 Kb/s 1351.96 Kb/s   11.25 Mb/s 8335.22 Kb/s
       64x64_red.png  6208.23 b/s  5204.88 b/s  9659.76 b/s    10.66 Kb/s   10.66 Kb/s
       64x64_red.raw  1092.44 Kb/s   68.64 Kb/s 3372.53 Kb/s   49.51 Mb/s   15.43 Mb/s
     128x128_red.bmp  2225.90 Kb/s   78.87 Kb/s 2995.06 Kb/s         N/A  4528.58 Kb/s
     128x128_red.png  7546.62 b/s  6328.23 b/s  8282.86 b/s          N/A  7890.19 b/s
     128x128_red.raw  2616.03 Kb/s   79.20 Kb/s 7905.60 Kb/s         N/A  4530.11 Kb/s
     480x272_red.bmp  3171.19 Kb/s   81.90 Kb/s 4681.83 Kb/s         N/A  7275.36 Kb/s
     480x272_red.png  3590.26 b/s  3251.80 b/s  3603.57 b/s          N/A  3577.52 b/s
     480x272_red.raw  5890.60 Kb/s   82.45 Kb/s   10.34 Mb/s         N/A     9.91 Mb/s
     800x480_red.bmp  3447.47 Kb/s   82.25 Kb/s 4946.46 Kb/s         N/A  8171.39 Kb/s
     800x480_red.png  2508.42 b/s  2396.46 b/s  2512.11 b/s          N/A  2541.58 b/s
     800x480_red.raw  6152.87 Kb/s   82.98 Kb/s   12.61 Mb/s         N/A    13.25 Mb/s
   32x32_flowers.bmp   342.39 Kb/s   44.44 Kb/s 1251.63 Kb/s   10.88 Mb/s 7519.05 Kb/s
   32x32_flowers.png    64.96 Kb/s   29.17 Kb/s  117.79 Kb/s  136.69 Kb/s  135.66 Kb/s
   32x32_flowers.raw   223.46 Kb/s   35.89 Kb/s  947.56 Kb/s   42.67 Mb/s   14.76 Mb/s
   64x64_flowers.bmp   679.64 Kb/s   65.79 Kb/s 1330.18 Kb/s   11.31 Mb/s 8493.82 Kb/s
   64x64_flowers.png   129.59 Kb/s   45.22 Kb/s  165.60 Kb/s  204.74 Kb/s  202.35 Kb/s
   64x64_flowers.raw   761.75 Kb/s   59.69 Kb/s 3177.22 Kb/s   49.51 Mb/s   14.93 Mb/s
 128x128_flowers.bmp  1529.51 Kb/s   76.97 Kb/s 2967.87 Kb/s         N/A  4529.86 Kb/s
 128x128_flowers.png   202.94 Kb/s   56.64 Kb/s  212.15 Kb/s         N/A   212.79 Kb/s
 128x128_flowers.raw  3034.96 Kb/s   75.81 Kb/s 7625.00 Kb/s         N/A  4574.78 Kb/s
 480x272_flowers.bmp  3046.72 Kb/s   81.69 Kb/s 4674.06 Kb/s         N/A  7260.31 Kb/s
 480x272_flowers.png   214.83 Kb/s   59.98 Kb/s  219.46 Kb/s         N/A   223.42 Kb/s
 480x272_flowers.raw  5650.18 Kb/s   82.00 Kb/s   10.27 Mb/s         N/A    10.13 Mb/s
 800x480_flowers.bmp  3433.79 Kb/s   82.16 Kb/s 4943.24 Kb/s         N/A  8173.17 Kb/s
 800x480_flowers.png   214.75 Kb/s   60.40 Kb/s  219.03 Kb/s         N/A   223.16 Kb/s
 800x480_flowers.raw  5935.17 Kb/s   82.87 Kb/s   12.57 Mb/s         N/A    11.87 Mb/s

---

Some notes:

  1. The PNG files are smaller than RAW which are smaller than BMP
  2. PNG are hardest to decode resulting in low decode speeds. Fastest is RAW.
  3. 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 a set of large files iflash_*_image_data.c and qspi_*_image_data.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 and the image decoding 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.

Summary

It is possible to show charts of every possible combination of the data above, but instead of doing that we have selected one chart to be representable. It shows the load time for a simple menu system using ten 64x64 buttons and a full screen background image:

/media/uploads/embeddedartists/lpc4088dm_performance_menu.png

The internal FLASH data set has been left out as it is comparable to the QSPI flash in speed. The total loading times ranges from 26ms for arrays in QSPI to 6.6s for BMP files on a USB MemoryStick.

A small table with the recommended selection based on need:

NeedChoose
Small amount of data, only readingIFLASH / QSPI / QSPI FS
Large amount of data, only readinguSD Card
Only writinguSD Card
Read/WriteuSD Card
Quick loading small imagesRAW files on IFLASH / QSPI / QSPI FS
User editable/selectable images 1)BMP files on uSD Card
Want to avoid external memoriesPNG files on IFLASH / QSPI / QSPI FS
  1. For example in a image viewer where the user inserts a media with images from e.g. a camera. In this case the extra step of converting images to RAW format is unwanted. Better to use the slightly larger BMP files instead.

All wikipages