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

External Flash (QSPI) vs Internal Flash Write Performance

Hi,

I have some code written to copy PDM mic data into the external and then later dump it over UART. The issue I have is that when using the external flash, my audio gets corrupted because the QSPI flash writes don't keep up with the PDM data. However, when switching to the internal flash, I don't have this issue and the audio sounds clean. Now I thought the QSPI speed would dwarf the PDM speed, however, I'm not finding that to be the case. My question is, am I missing some sort of configuration register that's restricting it to low speed, or is this to be expected? Is there some limitation of the onboard flash on the dev kit?

Numbers:

PDM input: 50,000 int_16 samples per sec (3.2MHz)

QSPI CLK: 32MHz (measured on scope)

  • Hi

    Writing data to the on-board QSPI will not be very fast as the MX25R6435F is a typical NOR Flash memory chip (datasheet here). it has a high read speed, but a slow write/erase speed. The MX25R6435F is perfect for execute in place (XIP), executing program code directly from external flash. It should be notably faster to write data like this to the nRF52840's onboard flash.

    Best regards,

    Simon

  • Hey Simon,

    Thanks for the response. If I have an application that requires more than the 1MB onboard flash, is using a NAND flash my best option or are there other alternatives?

    And just out of curiosity, do you know what the expected throughput would be of the MX25R6435F?

    Thanks!

  • Hi

    The QSPI peripheral automatically sends a read status command (opcode: 0x05) for each read/write operation, something that NAND flash doesn't support as far as I know. So what you'll have to do, is to use Sending custom instructions to implement read/write operations for memory devices that don't support this opcode. So you should have this in mind if you're planning on working with a NAND flash.

    As for the expected throughput, we tested on Windows with USBDeview and got the following throughput some time back:

    Best regards,

    Simon

Related