Closed terrillmoore closed 4 years ago
Root cause: there is a pull-up resistor (R9) from D5_SD_CS#
to VOUT_2
(the SD card supply). The totem-pole internal to the driver, U3, is powered from VDD, not VOUT_2.
When D5_SD_CS#
is driven by U3, it therefore supplies power to VOUT_2
(through the 10k resistor). This then comes to the input of U5, essentially forming a latch. Thus, you must drive D5_SD_CS#
to zero before turning off VOUT_2
, or you'll never remove power. The output driver iin U3 is not strong enough to power the SD card, but the SD card is left at an intermediate voltage (2.3V to 1.6V, depending -- you can be well into the linear range of the input U5 and still be able to enable U3).
The solution is to drive D5_SD_CS#
to zero before turning off VOUT_2
.
I also found that it seems to help to drive the other SD card signals to zero (MOSI and CLK), probably because of the protection diodes; these can also source power to VOUT_2
. A delay also helps by allowing time for all the nodes to discharge.
When running the catena4430-sensor example, it's very common for the SD card not to come up. The symptom is a bunch of error messages on the console, followed by
"checkSdCard() failed"
.It doesn't happen every time, but it happens a lot.