This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fat32 implementation for usb host

Hello, I want to initialize the fat32 file system for usb host on at91sam9260.I am having problem in checking the boot signature.My application is to read/write the text file from the mass storage device.I am doing such task (implementing the file system)first time...So plz help me regarding this....Thank you.....

Parents Reply Children
  • How about debugging???

    You have now come about as far as I suggested one week ago - to verify if there is a file system there, and if your read code is able to correctly read the existing contents.

    Debugging is a major part of software development. And something you need to spend own time with. Trying to ask a web forum for every single step isn't a productive route. If you write the flash read code yourself, you have to compare your code with the requirements specified in datasheets. If you have copied the code from some other project, you have to figure out if that other project can correctly read the data. If yes - then you have to figure out why your copied code can't.

  • Hello,
    After checking with pen drive having fat32 file system(transend 8 GB pen-drive i am using),but sector buffer does not match with that checked it on PC...is there any problem in initialization process???

  • You always just write "does not match" or "completely different". That doesn't really tell much.

    But exactly _what_ are you seeing? Hints that you read data but it is corrupted? Or always empty data? Or what? Debugging is about looking at whatever clues you have and try to deduce potential error sources. Or trying to figure out how a test can be changed to give better clues.

  • Hello sir,
    sector buffer always shows all the fields Zero...

  • It couldn't have hurt too much to have written that information in one of your first posts? Have you verified that the hardware actually makes an attempt to access the memory? Have you verified that the relevant hardware pins are reacting? That the memory chip is correctly connected? And powered?

    Are you using your own hardware design or an existing evaluation board that have sample code to access this flash memory? Does there exist any sample code somewhere that _can_ access the flash memory, even if your specific project seems to fail?

    It is obviously not meaningful to consider any FAT16 or FAT32 or other file system until your specific hardware together with your specific memory access code is able to read and write data correctly when accessing the flash. Then, and only then, will it be meaningful to look at the building blocks that depends on working flash access. So FAT32 or USB is irrelevant until read/write of flash sectors works.

  • Hello sir,
    I am using my own designed hardware and the hardware actually makes an attempt to access the memory as i checked it after the enumeration process...I think there is problem in passing the drive address on which file system is to be mounted, but i am not sure...by knowing the initialization procedure of fat, i want to check is the problem actually exists or is there any other problem??
    Thank you...

  • Why bother about enumeration files etc before you have validated the code to access the memory?

    Start by ignoring all of that and concentrating on what your microprocessor can do about accessing the memory. Do not try to debug a system before you have debugged the individual modules that forms the system. "passing the drive address" or "mounting of file system" should be irrelevant to the current question: Can your hardware correctly access the memory? Can your microcontroller write a pattern and then read it back correctly? If the answer is no, then you aren't likely to be able to send information over USB, and store in that flash and later read it back either.