LUFA + FatFS (optional) losing filesystem format

19 views
Skip to first unread message

Davide Albertini

unread,
Aug 2, 2018, 7:00:52 AM8/2/18
to LUFA Library Support List
Hi everyone,

I've got some issue, similar to the issues described in this topic
https://groups.google.com/forum/#!topic/lufa-support/8g1L3KHGm9A


I'm creating a funny personal project.. let's say.. it's a sort of tachimeter for hobby stuff (drones, rc planes, etc..)
the base project works just fine, now i'm trying to upgrade it setting up a tft display with some custom icon and other small drawings.

to achieve this, i'm exploiting LUFA (I followed the mass storage class device example) to connect my ATXMega128a4u to an AT45DB041E
dataflash (512kb).

Everything works fine, and I'm able to connect my board to my PC, let windows format the flash disk and transfer most of the images I need.

the issue comes when (apparently) I've transfered about 100kb (or more) of data on the flashdisk. As soon as I disconnect my board from windows,
all the filesystem is lost and all the data as well.


I've tried to debug in any possible direction, but I've actually no idea (at the moment) on where to look so as to understand why the OS (windows, let's say)
overrides some PRECIOUS sector in which the filesystem is written.


On this stage, actually, FATFs is not implemented yet in my project, but this will be the future step.
As for now I've got these issues that prevent me to uploading on the flashchip more than a small amount of data.


Any clue?


Best
Davide

Davide Albertini

unread,
Aug 2, 2018, 8:41:32 AM8/2/18
to LUFA Library Support List
Actually, I've got to say that it seems I solved my issue.

I was wronlgy shifting the byte address, causing to send data on wrong position of the dataflash.


So, I believe that i'll keep you posted with my updates ;)
Reply all
Reply to author
Forward
0 new messages