Skip to main content
Graduate
November 29, 2019
Question

XiP and FATFS on the same NOR Flash simultaneously.

  • November 29, 2019
  • 6 replies
  • 3038 views

Hello guys!

In our project we use STM32H750VBT6 MCU and an external NOR-flash chip W25Q128. Tell me please can we use XiP technology and FATFS file system on this flash memory simultaneously? 

Might there be a conflict at the QSPI level or at the memory chip level?

If there can be a conflict what could you to recomend fo us? If there can be a conflict so what could you to recommend for us in this case? We need a lot of memory for the firmware and for the file system.

    This topic has been closed for replies.

    6 replies

    Explorer II
    November 29, 2019

    QSPI NOR in this context is VERY slow for writing, you'd likely want to use 4KB sectors for FatFS.

    Read, Erase and Write don't play well simultaneously.

    Consider eMMC for active data storage and file systems.

    OleksandrAuthor
    Graduate
    November 29, 2019

    Yeah, I fully agree with you - it is very slow for writing. I have never had an experience with this type of flash but now I have it. :))))

    I have no way to change the type of flash memory because the PCB is done and all components are soldered. I need to run it with current hardware set. But the question is active yet - is it possible use XiP and read/write data on the same external NOR flash? I guess not, but I could be wrong.

    Best regards,

    Alex.

    Explorer II
    November 29, 2019

    You tend to have to switch off the memory mapping to do the direct programming, so there really isn't the concurrency you seek. I haven't wasted a lot of time experimenting, as it is all rather an inefficient cul-de-sac.

    Can you use RAM, and there's 1MB of flash on the H750 you're probably not using.

    Explorer II
    November 29, 2019

    Perhaps you can float off the W25Q128 and replace with a W25N01GV for storage, move the code to internal FLASH, or pull overlays to RAM from NAND

    OleksandrAuthor
    Graduate
    November 30, 2019

    The H750 only has 128k flash and 1MB of RAM

    Explorer II
    November 30, 2019

    The die has 1MB of FLASH, I've got parts here, I've tried them

    Visitor II
    November 30, 2019

    So they are H753 parts that failed QA.

    Visitor II
    November 30, 2019

    >We need a lot of memory for the firmware and for the file system.

    Define "a lot of" please, if you want meaningful suggestions. How much for each?

    Were it possible to replace the H750 with a H743, and use its 2MB internal flash for either the code or the FS?

    OleksandrAuthor
    Graduate
    December 1, 2019

    "a lot of" - I think it is about 20 MB.

    This project has a 240x240 RGB565 color display. Of course, we can move all pictures in files but, you know, it is convenient to hold them as arrays.

    Super User
    November 30, 2019

    >The H750 only has 128k flash and 1MB of RAM

    That's more than rather capable PCs used to have. "Only" is a relative term.

    What Clive Ludolph wants to say is, that you can't read the QSPI area while writing the FLASH, so you'll need to have the write functions in FLASH or in RAM (to which they might've been moved from the QSPI FLASH). Of course you'll have to take into mind the impact of writes on performance, and concurrent data and program access into the QSPI memory will also have an impact on performance.

    Benchmark.

    JW

    PS. Change your username to a normal nick.

    Visitor II
    December 1, 2019

    Takes 2 weeks to redesign a PCB and probably longer to develop the workaround to use a serial flash for 2 very different purposes.

    At least, make sure that the code which perform the FATFS is in the internal flash.

    20 MB means tons of pictures, text, languages, non code elements.

    If the graphics code is in the MCU memory, then you can try to use DMA2D direct read from the QSPI memory.

    If you use FATFS, you won't be able to use HW DMA2D directly.