DISKIO for SAM L21

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

I'm using Atmel START to generate a project for my SAM L21 Xplained Pro (ATSAML21J18B).  When I attempt to add a DISKIO middleware component I get the error "Missing requirement: Api: SD-MMC:Lib:API"

 

I wasn't able to find a component resembling that in the list that comes up when I click Add Software component.

 

Is this a bug in the START interface / missing middleware?  Any suggestions?  I'm just trying to get a quick and dirty sample up to read a file from a FAT-formatted SD Card over SPI.

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

It's just not available in Atmel Start for SAM L21.

You could try the ASF3 example:

Basic FatFS example, it will create a FatFS file system, write a file and check the content of the file. [FatFS Example - SAM L21 Xplained Pro B - ATSAML21J18B]

/Lars

 

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

Thanks for the response.  If it's not available, shouldn't they filter the DISKIO component out of the list so it can't be selected?

 

I'm trying out the ASF3 example.  It partially works, in that I can read a listing of files on the card, but the stock example fails to actually write anything (even though all the calls come back successful and the demo reports "[OK]" after each step).  I'm attempting to diagnose the code now in a debugger, but it's kind of terrible - e.g. they send data to the FatFS layer one byte at a time, when the underlying functions being called are already set up to handle string buffers.

 

Also finding some poorly documented hacks they added to ElmChan's original code.  I'm starting to wonder if anyone at Atmel actually tested this beyond gluing together some examples they found on the internet and hitting the compile button.

Last Edited: Thu. Jan 9, 2020 - 08:46 PM