Write/Read multiple blocks to SD card

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

Has anyone here been able to read and write to an SD card using multiple block transfers? I have been trying to modify the Atmel Software Framework to achieve it but haven't been able to. It doesn't seem very complicated but for some reason I can't make it work. Could someone give some advice or share some sample code showing the timings and commands?

Thanks in advance.

Daniel
www.weartech.es

Daniel Campora http://www.wipy.io

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well I can but I use Chan's FatFs. If you only want the low level stuff and not his FAT file system on top then just use the direct access routines in mmc.c in the ffexample.zip file.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I have been trying to adapt his routines to my code without success.

My main problem now is that the card accpets the first block but rejects the second one. After accepting the first block I wait until the card is not busy and then send a new multiple_block_write token followed by the new data block, so it should be working, but is not....

Daniel Campora http://www.wipy.io

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am now able to write multiple blocks. I attached the routines here:

https://www.avrfreaks.net/index.p...

Daniel Campora http://www.wipy.io