0

Adalogger RTC SD Initialization Failed - Repeatable Fix
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adalogger RTC SD Initialization Failed - Repeatable Fix

by tyler123 on Fri Jul 16, 2021 3:56 pm

I recently purchased 2 Huzzah32 boards and 2 Adalogger RTC boards.

When running any SD card file (for example the example listFiles), the board would always say initialization failed during the initial setup.

In trying to debug, I put the initialization attempt in a while loop and it would fail hundreds of times in a row. But then I found out I could make it pass initialization by jiggling it. Once it initialized, it had no problem writing to files.

Through further jiggling, I narrowed it down to just touching the SPI Microcontroller In Sensor Out (MISO) pin would allow it to initialize. In a kind of sketchy maneuver, I threw a 1Mohm resistor from 3v to the MISO pin and now it connects every time.

Am I the only one that's had this issue? Why is this occurring? Is there a better fix that my sketchy resistor? Is my sketchy resistor going to cause any issues with that MISO pin?

Edit: This issue is 100% repeatable on two different sets of boards.

tyler123
 
Posts: 12
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by adafruit_support_mike on Tue Jul 20, 2021 2:12 am

That's certainly odd, and we've never seen that behavior ourselves.

It sounds like a connection issue though. Did you get the RTC FeatherWings with presoldered header, or solder your own?

adafruit_support_mike
 
Posts: 63729
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by tyler123 on Tue Jul 20, 2021 11:00 am

Thanks for the reply!

Unfortunately, I don't believe the RTC Adalogger has a presoldered option, so I soldered it myself. The Huzzah32 came presoldered. This exact problem occurs on 2 different Huzzah32s with 2 different RTC Adaloggers and my solution fixes the problem on both boards. The solder looks clean and I've soldered a wide variety of LEDs and sensors (IMUs, etc) with no issues.

The thing that makes me think it's not a soldering issue is that once I initialize, I can remove the resistor and it continues to write to the SD card. I can send sensor data from the Huzzah32 to the wing and write it to the SD card. I can send RTC data from the wing to the Huzzah32 and broadcast that over UDP. The only issue is SD card initialization.

Edit: While I have somebody's attention, I also had the same issue as the user in this forum post from 2019: viewtopic.php?f=22&t=147315. The guide was never updated with the fix. The important bit is that the file needs to open and close every loop or it never actually writes anything to the card.

tyler123
 
Posts: 12
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by adafruit_support_mike on Tue Jul 20, 2021 10:40 pm

For the sake of a sanity check, post a photo showing your hardware and connections please. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 63729
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by tyler123 on Wed Jul 21, 2021 8:55 am

See attached. Without that resistor, it fails initialization every time. As soon as I either touch the pin or connect this resistor, it works every time. 100% repeatable on 2 different board setups. I've attached the code as well although it's pretty much the demo file.
Attachments
sdTestListFiles.ino
(1.7 KiB) Not downloaded yet
Huzzah32SDFail.png
Huzzah32SDFail.png (725.6 KiB) Viewed 101 times

tyler123
 
Posts: 12
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by adafruit_support_mike on Thu Jul 29, 2021 3:08 pm

Thank you.

Your soldering looks good overall, but I see a couple of onion-shaped joints. That’s often a symptom of poor wetting between the solder and the pad.

Give any joint that isn’t a nice fillet from the pin to the pad a dab of solder and reheat them. See if that has any effect on the SD behavior. It may not, but connection issues will obscure any deeper issues.

adafruit_support_mike
 
Posts: 63729
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by tyler123 on Thu Aug 26, 2021 2:39 pm

Hey Mike,

It's been a while since you suggested cleaning up the solder. I've been busy and didn't have time to respond. Since your suggestion, I've cleaned up the solder on those 2 boards and I've received 2 additional boards. All 4 boards have the exact same problem and solution. To be clear, this is 4 different Huzzah32's and 4 different Adaloggers.

To recap - the SD card on the Adalogger fails to initialize nearly 100% of the time. When I touch the MISO pin with my finger or a wire, it instantly initializes the SD card. My "permanent" fix is to throw a 1Mohm resistor from 3v to the MISO pin and it connects 100% of the time. This fix works on 4 boards.

I'm confident that this is a problem and solution you could recreate on your end. It would be awesome if you could recreate it and provide some more information on a better fix or at least confirm that my resistor fix isn't going to cause any issues.

I'm going to also redraw attention to this statement from one of my earlier posts: "Edit: While I have somebody's attention, I also had the same issue as the user in this forum post from 2019: viewtopic.php?f=22&t=147315. The guide was never updated with the fix. The important bit is that the file needs to open and close every loop or it never actually writes anything to the card."

tyler123
 
Posts: 12
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by adafruit_support_mike on Thu Aug 26, 2021 8:36 pm

I have those boards and will try to replicate it. The fact that you’re seeing repeatable behavior across several boards does suggest a systetmic issue.

adafruit_support_mike
 
Posts: 63729
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by tyler123 on Fri Aug 27, 2021 8:45 am

That's great, thanks! Let me know what you find. Here's the simple bit of code that I used to test touching the MISO pin:

Code: Select all | TOGGLE FULL SIZE
while (!SD.begin(SD_PIN)) {
    Serial.println("Card init. failed!");
  }
  Serial.println("Card init. succeeded!");

tyler123
 
Posts: 12
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by tyler123 on Thu Sep 16, 2021 2:00 pm

Hey Mike,

Did you get a chance to prototype this?

tyler123
 
Posts: 12
Joined: Thu Jul 01, 2021 9:54 am

Re: Adalogger RTC SD Initialization Failed - Repeatable Fix

by adafruit_support_mike on Sun Sep 19, 2021 2:30 pm

I did some quick tests and wasn't able to reproduce the problem on my boards. I want to do some more detailed testing to see if there's a margnal signal somewhere, but life has been getting in the way.

adafruit_support_mike
 
Posts: 63729
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.