cancel
Showing results for 
Search instead for 
Did you mean: 

XiP and FATFS on the same NOR Flash simultaneously.

Oleksandr
Associate III

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.

14 REPLIES 14
Clive1 (HNL)
Senior II

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.

Oleksandr
Associate III

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.

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.

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

Oleksandr
Associate III

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

>> pull overlays to RAM

It is really interesting. If you can explain it more widely I will be grateful you for this. Maybe you could put here some links where this topic explains. But for now, I’ll try to find a solution myself.

berendi
Principal

>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?

>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.

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