cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO with DMA hangs when reading less that 512B of data

leszek2
Associate II
Posted on April 06, 2011 at 13:39

SDIO with DMA hangs when reading less that 512B of data

5 REPLIES 5
leszek2
Associate II
Posted on May 17, 2011 at 14:30

Problems persist.

Is it normal? I need to reinit the card each time I'm trying to do sth with it.

If I init the card at program start and then in 100 ms loop try to read, read/write or write I'm getting after 1 or 2 succesful operations a cmd_resp_timeout (card gets hanged?) and without resetting sdio, uSD power and finally reinit the card I cant do anything with it.

For now I'm testing with 64 MB card, but in a moment I'll do some testing with 8 GB card, maybe there is something wrong.

Buswidth is set to 1b, DMA access mode.

Posted on May 17, 2011 at 14:30

Why would you read/write blocks/sectors that are not in 512 byte units?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
leszek2
Associate II
Posted on May 17, 2011 at 14:30

I dont know :(. I was only testing the possibility to write less than 512B in block. Now it doesnt matter, because writting/reading 512 and less bytes in block works.

The problem is described in second post with that unstable work of card and the need to reset sdio interface with usd power toggle to do few subsequent reads or writes.

Maybe that problem occurs because I dont check the card state? After init I'm trying to write or read to fast or after last read/write I'm trying to read/write again too fast?

leszek2
Associate II
Posted on May 17, 2011 at 14:30

Maybe everything is okey. I havent changed a lot, maybe nothing. But now I know that placing breakpoints causes errors.

If I place a breakpoint in a place where I know that program will go in a moment I can see that error counter rises because of cmd_resp_timeout error.

The incrementation of error counter is everytime when Status is not equal to SD_OK.
leszek2
Associate II
Posted on May 17, 2011 at 14:30

So far, the testing of read/write operations are fine. After ~800k writes to memory (each time different data), read and finally compare read - write I`ve achived 2-3 wrong comparations.