Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Troubles about Copying FATAS on STM32F469

Status
Not open for further replies.

shay1995

Newbie level 3
Newbie level 3
Joined
Mar 4, 2017
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
Good day,all.

I have try my best to solve this problem -- I am using FATFS13 on my custom STM32F469 board and I am using the Standard Peripheral library.

My situations is that I have connected 1MB of SRAM over the FMC bus, and an SD card over the SPI bus. I can mount on both hardware a FAT file system, FAT12 on the RAM and FAT32 on the SD. I tested SD cards up to 32GB so I can say that everything is working. It's possible to manage files on each volume. I named them RAMDISK and SDCARD in the ffconf.h. Basically I want two drives so that the user can copy graphic files in the SRAM for a faster access during the execution of programs.

My problem is that when I try to copy a file from one drive to the other, it's copied only the first chunk of data. A single cycle: - read from source - copy to dest - read from source -> Error 9 on the source ((9) The file/directory object is invalid).

I tried to dig into the code, and with the debugger I noticed that after the write to the destination file when it's time to read the second chunk of data, the 'obj->fs->fs_type' of the source file is set to 0. So the validation fails.I can't figure out why. Did you have a similar experience?

In order to avoid this error I need to have only one file opened a time, so I temporary solved the problem with this sequence: - open source - read chunck of data at offset - close source - open destination for append - save chunk of data - close destination !

Is there a particular way to perform a correct copy on different volumes?

Thanks in advance for any advice.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top