SD MMC Fatfs on ATSam3x8e problem in Atmel Studio 7

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

Posts: 2
Joined: Wed Aug 23, 2017 9:59 am

SD MMC Fatfs on ATSam3x8e problem in Atmel Studio 7

Mon Aug 28, 2017 9:10 am

Hello everyone,

1. I am using Ardunio Due board (atmel SAM3x8e microcontroller) in Atmel Studio 7.

2. I am facing problem in interfacing SD card in Fatfs with ASF using SPI mode.

3. After calling sd_mmc_init(); My card get detected as SD card Ver 2.0 with proper size of 4GB.

4. after that f_mount() returns FR_OK but f_open() fails with return code 3.

5. Does someone has interfaced SD card Fatfs successfully.

6. There are lots of undocumented config setting in atmel ASF code , i also tried much of them but finally decided to seek for help from outside.

Location: USA
Posts: 2154
Joined: Thu Apr 19, 2007 10:15 pm

Re: SD MMC Fatfs on ATSam3x8e problem in Atmel Studio 7

Tue Aug 29, 2017 1:03 am

I know nothing about Atmel Studio 7, but beware that Windows "partitions" an SDcard differently than Linux.
That is, Windows does not install a (MBR) partition table on SDcards, whereas Linux installs a MBR and partition table in the first sector.
IOW WIndows treats the SDcard like a floppy diskette, whereas Linux treats it like a HDD.

However your SDcard is formatted, try redoing it using the other OS.
But first obliterate the existing partitioning using the Linux shell command `dd if=/dev/null of=/dev/sdX count=63` for best results (replace X with the proper device letter, which is probably something other than `a`).


Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 3 guests