This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

External flash file system performance nRF52840

Hello,

I have implemented a file system on the external flash, following the example: "USB MSC Example", SDK16, nRF52840. The objective was to implement an audio recorder application.

I did a little performance test, by continuously writing chunks of 2400 bytes, using fatfs/src/ff.c f_write(). I measured timing of every 100 transactions as you can see below.

I can see that average time for such transaction is ~30 mSec (~3 sec for 100 transactions).

This is done by using the fastest clock possible (as far as I understand): #define QSPI_CONFIG_FREQUENCY 0

My question is: Is this a reasonable write performance? What can I do to improve it?

I tried to understand if the QSPI driver is using DMA but couldn't get a clear picture about it (other than that documentation says this is the default).

Thanks in advance!

Line 1: [1;35m[00:00:00.026,000] <info> test_fs: Start 100 write transactions[0m
Line 2: [1;35m[00:00:02.789,000] <info> test_fs: Completed 100 write transactions[0m
Line 10: [1;35m[00:00:07.982,000] <info> test_fs: Start 100 write transactions[0m
Line 11: [1;35m[00:00:11.205,000] <info> test_fs: Completed 100 write transactions[0m
Line 19: [1;35m[00:00:16.393,000] <info> test_fs: Start 100 write transactions[0m
Line 20: [1;35m[00:00:19.423,000] <info> test_fs: Completed 100 write transactions[0m
Line 28: [1;35m[00:00:24.633,000] <info> test_fs: Start 100 write transactions[0m
Line 29: [1;35m[00:00:27.466,000] <info> test_fs: Completed 100 write transactions[0m
Line 37: [1;35m[00:00:32.652,000] <info> test_fs: Start 100 write transactions[0m
Line 38: [1;35m[00:00:35.556,000] <info> test_fs: Completed 100 write transactions[0m
Line 46: [1;35m[00:00:40.739,000] <info> test_fs: Start 100 write transactions[0m
Line 47: [1;35m[00:00:43.590,000] <info> test_fs: Completed 100 write transactions[0m
Line 55: [1;35m[00:00:48.773,000] <info> test_fs: Start 100 write transactions[0m
Line 56: [1;35m[00:00:51.526,000] <info> test_fs: Completed 100 write transactions[0m

Parents
  • Hi

    The testing we have done for the QSPI peripheral is rather limited, but here's what we've got:

    We have one test "XIP of 16-bit instructions can be done at the expected rate" (0003) – this is passing on Graviton.

    This asserts that execution is >118 Mbit/s, with execution measured at 122 Mbit/s.

    This is tested using straight-line “nop”s.

     

    We also have a test that involves testing read-speed (reading QSPI data, not XIP) “QSPI can be used in a sensor use-case” (0001) – this is also passing.

    This measures the read speed to be 105.7 Mbits/s, and will pass if read speed is >1.6 Mbits/s.

    You might be running into possible write speed limitations in the memory module. Flash memory is a lot slower to write than to read, which I assume is why we've tested read only.

    Best regards,

    Simon

Reply Children
No Data
Related