G400TH SD.Dx lines


I do not see any pull-up resistors on the G400TH schematics for the SD Card reader SD.Dx lines but they are indeed pulled high. Are there any pull-up resistors on the SOM itself or are you using weak pull-ups from the MCU pins ?

And, if you are using pull-up resistors on the SOM, will they be always available on the G400TH ? (I mean, no change planned ?)

@ Bec a Fuel - As you discovered, there are no pull-ups on the SD pins on the TH board. The SoM also does not contain any pull-ups on those pins. It must be the weak pull-ups from the MCU.

@ Aron GHI,

I’m new in G400TH connecting with SD card module.
Could you show us the schematic diagram?

@ Kok Hung - https://www.ghielectronics.com/catalog/product/547

Thank you, Mike.
I’ve gone thru all relevant document. Except the G400-D Dev Board schematic diagram, none concerns about the connection diagram of SD card (SPIO mode).
My code, SD card and files in the card run well in G400-D Dev Board. Now I am doing the prototype from G400TH as shown in the attached photo. The code can “New” the SD object and “Mount” the SD card. However, the disk format was damaged once after the following codes:-
VolumeInfo vi = VolumeInfo.GetVolumes()[0];
MediaEventArgs ma = new MediaEventArgs(vi, DateTime.Now);
The vi.isFormatted return 0.

Mike, I am sure the wiring connections were done according to pin assignment laid down in the G400-D Dev Board schematic diagram. Could you help me what i am going wrong?

I would try very short cables for signal and power lines of the SD-Card and perhaps a capacitor form GND to VCC near the SD-Card.

huge antennas in those long wires !

You must use short wires. Also keep them away from all the other wires you have - I see there’s a random set of power wires with alligator clips behind those wires, keep everything away! Signal integrity on SD is sensitive on a high speed processor, so prototyping like this is fraught with risk.

You should also run thicker wires for power and GND, and as @ RoSchmi says adding extra capacitance on the SD card board is probably a good idea.

Thank Brett and RoSchmi for your valuable knowhows.

Brett and RoSchmi,

I re-wired the connections between the G400TH and my SD card module as shown on the attached photo.
However, the outcome did not change. After successfully “Mount” the SC card, the succeeding VolumeInfo.GetVolumes()[0] method returned an volume while the isFormatted property was zero. The Volume of SD card was found corrupted in my computer.

Anthing still wrong? Please help.

Shorten the wires as much as you can and add a 47uf capacitor on the lower pins right on the connector.

SD signals are very sensitive.

1 Like

Gus said:

You meant the Power pins, didn’t you?

Yes correct.


I followed your advices adding capacitors as close as possible to the SC card module. Now I can read my database stored in the SD card with SQLite.
However, I cannot update the database. I noted that there is a “Write Protect” pin attached with your SD card module in the development board. On G400TH through-hole board, I cannot find the pin PD5. How can I update my database in the SD card without pin PD5 for “Write Protect” setting?

Please advice.

That pin is optional. You do not need it.

When you write data, you have to flush the file and when flush the media itself to make sure all data is written.

Thank you for your reply, Gus. In fact I’m not writing a file in the SD card.
I am using your SQLite in dot net micro-framework and dragged on the following coding:
SQLite.ExexcuteNonQuery( "INSERT IN aTable ( Column1 ) VALUES ( Value1 ) " );

In G400D Dev board the code runs well. In G400 TH board, the above SQL statement stands still but SQL Select statements are still normal.

Your advice will be much appreciated.

@ Kok Hung - then it must be your SD wiring. Any pictures you can share?

@ Gus,

Thank you for your advice.
I double the soldering of wiring and found one connection was failed.
I fixed it and the problem was solved.

Once again, thank you very much.

1 Like