2016-06-07 12:04 AM
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.2017-02-19 10:03 AM
Yeah sure , let me know what you need specifically
Thanks
Imtiaz
2017-02-19 11:40 AM
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.
2017-02-19 11:48 AM
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?
2017-02-19 11:50 AM
I have replied to via email
2017-02-19 12:28 PM
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
2017-02-19 12:50 PM
Attached – fatfs disk io layer file.
________________ Attachments : user_diskio.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hytg&d=%2Fa%2F0X0000000bDo%2F5yL_sKpY9Z8G15Tt8foM6w1aPWo6LliB7VKXTfhBt1A&asPdf=falseimage001.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hyui&d=%2Fa%2F0X0000000bDp%2Fdw0XT8Nv0q3MWo4NMPqeyC6hjXjRTcBRe40KTHpNp8M&asPdf=false2017-02-19 03:45 PM
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.
2017-02-20 11:28 AM
Hi,
can you give me a hint, where to find it? I do not see any file.
Best regards
Lars
2017-02-20 11:40 AM
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