Pages: [1]   Go Down
Author Topic: Mmc spi problem no start byte error  (Read 605 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I am having an issue with reading an sd card using an mmc library in bootloader with 328p. Initializatio fine. Reading sectors good, most of the time. Occasionally have error reading sector. Byte Address correct, data at location. Spi doesn't read. I get back no start byte error back. Not sure what this means or how to remedy. Tried re-init spi at spot where error occurs, but doesn't help. Is this spi problem, sd card problem or timing problem?

Thanks,

ren
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11672
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It might be any of those really - what speed SPI are you using (try slower if you're using a fast clock).  There might be a bug in the library, try a different one (I believe there are several).  If you tell us which library and card details someone might have more info.
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

MarkT,

I adjusted read speed from 0<<SPR1 | 0<<SPR0 to 0<<SPR1 | 1<<SPR0 and it fixed the problem. Nice call.

Thanks,

-ren
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11672
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah good to hear it worked.  You may find that some manufacturer's cards are better (faster) than others.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: