FatFs cannot write file larger then 64kB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-23 5:40 AM
Hi
i build an application with fatfs implementation to log data.
but when the file size reach 64kB, the SD card stop responding and i can not write on it.
I used standard configuration for ff_conf
any suggestion to resolve the problem ?
thank you.
Solved! Go to Solution.
- Labels:
-
FatFS
-
STM32WL series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-29 2:45 AM
using the low level code from stm32wl FatFs example to interface FatFs drivers with my spi peripheral was not worked.
by trying the low level code from stm32f7 example it is work correctly
it was about the implementation of :
BSP_SD_ReadBlocks
BSP_SD_WriteBlocks
BSP_SD_Erase
.... and other functions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-23 12:18 PM
FatFs has > UINT btw, /* [IN] Number of bytes to write */
so limit is 4 GB .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-26 12:31 AM
Hi AScha.3
UINT is an unsigned int so it can reach 4GB.
but in my application :
- when f_size(&SDFile) reach 36911
- if i call f_lseek to set file pointer to the start of new line in text file
- then when move_windows() is called to read fill sector window with new data
- the SPI interface dos not receive any data !
(see picture)
and i have a file of 37kB (65kB on disk)
i also tried with FA_OPEN_APPEND to remove f_lseek fuction, but i have also the same problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-29 2:45 AM
using the low level code from stm32wl FatFs example to interface FatFs drivers with my spi peripheral was not worked.
by trying the low level code from stm32f7 example it is work correctly
it was about the implementation of :
BSP_SD_ReadBlocks
BSP_SD_WriteBlocks
BSP_SD_Erase
.... and other functions
