2

First of all, I have already been through http://elm-chan.org, and while it has helped me, it is a bit vague (in my opinion).

I am attempting to read an SD Card with an Xmega128a4u using ASF (because the non-ASF way is too underground for me...). Anyway, although ASF has an example with the Xplained board for Xmega C3, it is not very helpful, and my attempts at porting it fail.

So, the following is what I do:

  1. I start a Project in ASF (I'm programming in C)
  2. I add the FATfs, SD/MMC and systemClock divers(or modules or services) to my project through ASF Wizard.
  3. I get kind of lost... :(

I read in elm-chan's page that some sort of "glue file" but it's not very specific in what it should be. What should I #include in it or where should I #include it?

I'd appreciate some help on this as I have tried several things with no success.

1 Answers1

0

you have to addapt the disk_read, disk_write, ... functions in the diskio.c file. they will connect the fatFS library with your (low-level) sd communication.

you should may first test a simple communication with the sd-card without file system.

I have the same "project" but with an arduino due board instead of Xmega and the simple communication does allready work, so I can read and write. But my problem is to addapt the FatFS correctly and I suppose that the fault can be localized in my diskio.c functions, cause they are individual.

Maybe someone has got the same problem and can help me?

Ciao Imke