cancel
Showing results for 
Search instead for 
Did you mean: 

FatFS on QSPI Flash

zubizeratta
Associate II
Posted on June 07, 2016 at 09:04

Hello,

Is is possible to use FATFS file system on QSPI Flash with STM32F7 series microcontrollers? I couldn't find any example code about it. 

18 REPLIES 18
imtiaz
Associate II
Posted on February 19, 2017 at 19:03

Yeah sure , let me know what you need specifically 

Thanks

Imtiaz

Posted on February 19, 2017 at 19:40

I guess the time to update a sector of 4096 depends on the flash technology.

NAND has faster erase time with big sectors, NOR are faster access time instead with slower erase time.

If your example can be shared, some optimisation could be done (multi-write may not always need erase). The QSPI allows SW transparent read (which is not the case as microSD memory), hence DMA accessible... overall the memory is smaller and with more HW assist than the uSD memory.

imtiaz
Associate II
Posted on February 19, 2017 at 20:48

Hi Lars,

Initialisation of QSPI and pins is done via stm32 cube. Also when you generate your project using stm32 cube you can specify that you will use your own disk io implementation by selecting 'User Defined' under FATFS.

So most of the work is done for you and you only have to fill in the blanks within the 'user_diskio.c' file in your project.

How do we attach a file here?

imtiaz
Associate II
Posted on February 19, 2017 at 20:50

I have replied to via email

Posted on February 19, 2017 at 20:28

Hi,

specifically this means:

* Initialization of QSPI (And any depending components like Pin configs)

* ffconf.h

* Your definition of the Diskio_drvTypeDef driver functionality, which you hand over to the Filesystem via FATFS_LinkDriver

Thanks

Lars

AVI-crak
Senior
Posted on February 20, 2017 at 00:45

There is an easy way of data storage on external 'constant' a flash. In a condition that record isn't required, but it is important to have rapid access.

Structure with a tag of 'KEEP' in a linker.

I just put everything in the initialized structure, all the heavy project data: tables, pictures, units of a code, 'music', fonts and so on. All this big gravity, also doesn't require change during editing the master code of the program. For this reason in the project there are two hider.

In the first complete filling of structures, + creation of a firmware for external a flash. It works very long, in case of the size flash in 0,5M - compilation takes 140 minutes by my machine.

The second is cunning supports empty structure, but with a tag - not to optimize. Assembly of the project happens in seconds.

After that it is possible to address in the program the necessary data on a name, as fast as possible. Speed it is curled only from physical capacities of specific flash memory. At me on average it turns out 500MBit/s.

Posted on February 20, 2017 at 19:28

Hi,

can you give me a hint, where to find it? I do not see any file.

Best regards

Lars

Posted on February 20, 2017 at 19:40

Hi Lars,

I can see the file to one of my forum entries . It’s a zip file.

________________

Attachments :

image001.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyuY&d=%2Fa%2F0X0000000bDm%2Fda3UkfWEAXFOd5cC0PFU_OU8M5zgfDdnApoqL3bf0vU&asPdf=false