Go Down

Topic: Mmc spi problem no start byte error (Read 730 times) previous topic - next topic



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?




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.
[ I won't respond to messages, use the forum please ]



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




Ah good to hear it worked.  You may find that some manufacturer's cards are better (faster) than others.
[ I won't respond to messages, use the forum please ]

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131