4

I have an existing embedded system with an existing developed C code. Sometimes the microSD card can lock down giving responses outside of the scope of the existing system. I'm currently unsure why but suspect the handler in the existing system allows subsequent calls to be made too quickly.

The card is being used in Spi mode to have direct I/O.

The circuit diagram does not show any control over the power to and from the card so I cannot just reset and re-connect to the fresh Spi.

My only option seems to be finding a way to get it to reset through an Spi call, or look at creating a function to recover the sd back to its' expected state from whatever lock it is in.

With that in mind, is there a command or set of commands I can use to cause the equivalent of a reset, or to cancel whatever the microSD controller is expecting? Looking at the SD associations' specs, the only reset reference is the CMD0 and that isn't applicable once into Spi mode.

Any thoughts are welcome, and thank you in advance.

-Chris

Chris599
  • 41
  • 5
  • I should point out that I have seen this article: http://stackoverflow.com/questions/2365897/initializing-sd-card-in-spi-issues but in my case the card does work as is from the initial power on. So i'm a bit lost with it being an incorrect instruction method, and hope its more likely that the microSD card is expecting something that its' not getting. – Chris599 Aug 19 '15 at 14:42
  • Wouldn't it be better to get the driver working correctly? Embedded devices are not DOS/Windows (ok, older versions) PCs you reset once in a while. – too honest for this site Aug 19 '15 at 21:52
  • Indeed, handling the problem at source is best. – Chris599 Aug 20 '15 at 11:22
  • I'm new to stack overflow and found that paragraphs don't happen when you press return...... :) So, full reply: Thanks for the response. I will be getting that done as a separate branch in the development. But for compatibility with existing running instances, I must assume that a system could currently be locked (several in field without knowing if they're writing... previous dev didn't think to output that...). I am able to upload new functions to the existing systems, but not power cycle them. Its a difficult situation with my lack of intimate SD card SPI control knowledge. – Chris599 Aug 20 '15 at 11:34
  • So you should fix this obvious bug and update the devices out. There is no need to power-cycle after an update, but just reboot. If the company tolerates such crap even after knowing and is not going to fix it, you should think of a change. From my experience such ignorance is part of a more problematic general attitude. – too honest for this site Aug 20 '15 at 13:07
  • 1
    Thanks for your time Olaf. Fix the bug, roll it out, then see if there's anything to be done if there is a blocked one in existence. Good excuse to get some traces in there for my own debugging! – Chris599 Aug 21 '15 at 07:57

0 Answers0