cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO + FAT16/FAT32

mikewilliamson9
Associate II
Posted on September 06, 2009 at 03:51

SDIO + FAT16/FAT32

#microsoft:-broken-for-sure
49 REPLIES 49
bhpclan
Associate II
Posted on May 17, 2011 at 12:54

Quote:

I have the same problem, the both codes doesn't work:-|. Go direct to the HardFault Exception. There is some code thats really works?

Hi, you could try to disable WideBusOperation.

I recognized, that with WideBusOperation enabled I get a hard fault exception too.

Furthermore try to use other DeviceMods than DMA, perhaps this works for you.

Best regards

bhpclan
Associate II
Posted on May 17, 2011 at 12:54

*sorry, double posting*

[ This message was edited by: bhpclan on 26-01-2009 10:59 ]

vinicius_acvasconcelos
Associate II
Posted on May 17, 2011 at 12:54

Quote:

On 26-01-2009 at 10:58, Anonymous wrote:

Quote:

I have the same problem, the both codes doesn't work:-|. Go direct to the HardFault Exception. There is some code thats really works?

Hi, you could try to disable WideBusOperation.

I recognized, that with WideBusOperation enabled I get a hard fault exception too.

Furthermore try to use other DeviceMods than DMA, perhaps this works for you.

Best regards

I'm using SPI and EFS library, so the SDIO is disable, neither DMA.

There are some how to make this works properly?

Posted on May 17, 2011 at 12:54

Hello,

I have the STM3210E-EVAL board and try to run the code from the SDIO_DosFS_V2.zip example at the beginning of this thread.

I can compile the code with Keil's uVision (RVMDK 3.15b) after commenting the asm code in the HardFaultException Handler.

Although when running it, it doesn't do too much.

I tried to debug it and got this result:

http://dpaste.com/hold/113342/

Without a breakpoint it just stops automatically at the ASM code of ''SDIO_DeInit:'' with this error:

*** error 65: access violation at 0x40018000 : no 'write' permission

If I step through the code from there on I get more but similar errors (see dpaste).

I can continue stepping through the asm code until it gets stuck in ''SDIO_GetFlagStatus:'' at the command where the arrow (-->) is.

At this point I've a lot of error messages (see dpaste).

Anyone an idea? I've to admit I've not much knowledge about SDIO and I'm hoping to find a working solution without digging to deep into that technology and building it all from scratch.

Thanks in advance

-Stefan

Posted on May 17, 2011 at 12:54

It actually seems that my previous assumption was wrong, and that it was just counting down a huge counter, for which I had to go through every step.

But now I think I got the position where it is stuck:

Call stack:

main()

> DFS_ReadSector()

> SD_ReadBlock()

> CmdResp1Error()

Line #2170 in sdcard.c

while (!(status & (SDIO_FLAG_CCRCFAIL | SDIO_FLAG_CMDREND | SDIO_FLAG_CTIMEOUT)))

{

status = SDIO->STA;

}

ASM code:

2170: while (!(status & (SDIO_FLAG_CCRCFAIL | SDIO_FLAG_CMDREND | SDIO_FLAG_CTIMEOUT)))

2171: {

0x0800200A E001 B 0x08002010

2172: status = SDIO->STA;

2173: }

2174:

0x0800200C 486D LDR r0,[pc,#436] ; @0x080021C4

0x0800200E 6B47 LDR r7,[r0,#0x34]

0x08002010 F0170F45 TST r7,#0x45

0x08002014 D0FA BEQ 0x0800200C

Anyone a suggestion?

vbenso
Associate
Posted on May 17, 2011 at 12:54

I'm having the same problem. The setup is very similar so I will skip its description. Any news on this issue?

vladimir23
Associate II
Posted on May 17, 2011 at 12:54

In example:

Code:

static uint8_t transferbuffer[SECTOR_SIZE];

...

DFS_WriteFile(&fi, sector, transferbuffer, &cache, SECTOR_SIZE/2);

why ''/2''? When I try to write

Code:

DFS_WriteFile(&fi, sector, transferbuffer, &cache, SECTOR_SIZE);

hardfault exception appear

brunoalltest
Associate II
Posted on May 17, 2011 at 12:54

There is

http://www.stm32circle.com/projects/project.php?id=56

on stm32circle.com with DosFS.

Also, there is a

http://www.stm32circle.com/forum/viewtopic.php?id=450

about it in their forum.

relaxe
Associate II
Posted on May 17, 2011 at 12:54

Hello all!

Sorry to be mute at the moment, but I'm quite occupied at other things.

First, V02 works. For me at least!

I'm not sure about why/how people around here are getting errors. I can just promise to dwelve into that very soon. I actually plan on getting back at it next week.

We have used this code in our project, and have full FAT32 control over 16GB SD cards for audio streaming application. I may have tweaked a bit the lib since V02, and will just try to post the improvements (if any?).

-Relaxe

vinicius_acvasconcelos
Associate II
Posted on May 17, 2011 at 12:54

Quote:

On 05-03-2009 at 13:51, Anonymous wrote:

In example:

Code:

static uint8_t transferbuffer[SECTOR_SIZE];

...

DFS_WriteFile(&fi, sector, transferbuffer, &cache, SECTOR_SIZE/2);

why ''/2''? When I try to write

Code:

DFS_WriteFile(&fi, sector, transferbuffer, &cache, SECTOR_SIZE);

hardfault exception appear

You have the same promble then I. I tracked the hardfault exception, it's hapen when the fuction try to send to SPI a adress tha not fit in u16.

There's an error in the calculation of FAT adress in this library. Anyone already solve this problem?