Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:07 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : SDcard "fun".

Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 07:26pm 05 Oct 2021
Copy link to clipboard 
Print this post

I've been using a Samsung EVO 32GB C10 HC card for everything up until now. Doesn't matter which of my PicoMites it's in, it just works. I decided that I'd like a second card to use in the PicoMite that's boxed wih a ILI9341 display. That involves using an adapter, of course, but that's fine with the Samsung.

I got two Transcend SDcards (16GB C10 HC) from ebay, both appear to be ok as I can read & write them from the PC using the adapter. However, neither card will write when using the socket on the ILI9341, in spite of adding capacitors across the socket connections. They read ok, every time.

Now, just to add to the fun, the little development board that I built has no power filtering for the SDcard, just a simple breakout board (just the socket wired to pins), but both cards work fine in that.

It's almost certainly a power supply problem on the display and, if I can manage to isolate the supply pin on the socket somehow, I can probably get round it, but it's annoying.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 08:16pm 05 Oct 2021
Copy link to clipboard 
Print this post

I'd run a test on them, to be 100% sure they're not fakes.

I've had good results (i.e. found bad cards) with f3read & f3write

John
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 09:05pm 05 Oct 2021
Copy link to clipboard 
Print this post

Not having a linux box to hand, I'm trying MediaTester on one at the moment. We'll see how it goes. :)

EDIT:
The first card passed. Size is as expected.
Edited 2021-10-06 07:36 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 09:38pm 05 Oct 2021
Copy link to clipboard 
Print this post

Have you correctly configured the display and touch? Either can interfere if their respective CS pins aren't properly pulled high
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 09:56pm 05 Oct 2021
Copy link to clipboard 
Print this post

I'll check, but the Samsung card is working fine. I can try adding pullups but everything apart from those particular cards is working fine without. I'll dig out another SDcard adapter before I go any further, just in case that's gone flaky.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2642
Posted: 11:06pm 05 Oct 2021
Copy link to clipboard 
Print this post

The ILI9341 displays I have run the SD socket from a 3.3V regulator to allow for a 5V supply so when Vcc is 3.3v the SD socket gets about 3V, which probably dips further when writing. Could your new cards be sensitive to that?
Phil
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 06:23am 06 Oct 2021
Copy link to clipboard 
Print this post

That's very possible. *If* I can isolate the socket pin (won't be easy) I can fix that. Unfortunately there's no accessible track to cut. I may be able to change the existing reg to a higher current one though. I can also bypass the track to the card with a wire from the reg.

Or I can just get another SDcard...  :)  These won't go to waste.


EDIT:
Both cards have passed their test now, so I don't think they are fakes.
I can read and write to one on the CMM2.
Tried 2 different adapters on the ILI9341, but still getting "Error : A hard error occurred in the low level disk I/O layer" when attempting to write. I'm pretty certain it's a power supply issue now. I'll probably investigate further this evening.
Edited 2021-10-06 17:43 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 05:00pm 06 Oct 2021
Copy link to clipboard 
Print this post

Is the ili display powered from 5v?
If not the local 3.3v regulator is powered from 3.3v, and outputs some 3v or less. The card however needs 3.0v and draws quite some current when writing data. Maybe to much for a weak voltage regulator. Best power the ili display from 5v, then the local 3.3v is more stable.
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 06:23pm 06 Oct 2021
Copy link to clipboard 
Print this post

Yep, the ILI9341 is powered directly from the incoming 5v from he USB. I'm depending on the on-board regulator. I'll do some more tests in a bit.

Apparently a UHS-1 card can draw 400mA or so during write, even if it's only 1mA on standby. That's quite appreciable. Still 150mA or so for a default HS mode. The supply mustn't sag below 2.7v.


EDIT:
I tried putting a scope across the SDcard socket supply pins and the voltage refuses to drop, even with the capacitors removed.
Edited 2021-10-07 05:51 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 02:15pm 07 Oct 2021
Copy link to clipboard 
Print this post

Hi Mixtel,

I hope I understand this corect. The new 16G cards do not work in the SD card slot on the ILI9341 display, but they do work in a simple breakout board (first post).

I assume you are using OPTION SYSTEM SPI (which combines LCD SPI and SD card SPI).

It is possible that the combined load (chips, but also printed circuit board copper) loads the SPI bus too much for the higher clock frequencies. Note that there are 3 users (Touch, LCD and SD card) already. This could very well be a signal integrity issue, maybe caused by the board layout.

1/ Try splitting the SPI busses (you can put the SD card on a different SPI bus).
2/ Lower the SPI clock frequency
3/ Use series termination at (especially) the clock signals to the 3 users (meaning: cut the copper trace and put a series resistor of 50-100 ohm in series).
4/ Alternatively use parallel termination on the clock signal (meaning at each connector pin to the SDcard, DISPLAY and TOUCH, add 22pF and 100ohm series network to ground, clean up the waveforms) at the SPI clock pins.

Essentially you would like to measure these signals with a scope with FET probe (low capacitance) to see how bad it is.

Signal integrity is a big thing, can can be caused by many different things. A split ground plane, long and curly copper traces, forked traces, coupling from nearby copper traces, capacitive loads, trace impedance mismatch. Overshoot and undershoot may cause problems with devices (especially the smaller the geometry, the bigger the issue gets).

So your new cards could be sensitive to this, or could be causing it.

Maybe you have a link to the actual board layout ?

Regards,

Volhout.
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 02:21pm 07 Oct 2021
Copy link to clipboard 
Print this post

Oh, I forgot one thing of different origin.

With 3 users on the bus, a wrong configuration of chip selects could also cause this problem. The 32GB card could have stronger IO driver, and force it's levels onto the MISO pin, over weaker levels of i.e. the touch controller.

The 16Gb card could have weaker drivers that can marginally make it, but at the ILI board they can't.


And then, obvious but essential. Is the connector on the ILI board correctly wired ?

Volhout
Edited 2021-10-08 00:22 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 02:45pm 07 Oct 2021
Copy link to clipboard 
Print this post

TBH I'm not particularly bothered whether those SDcards work on the ILI9341 or not. They work everywhere else and other SDcards that I have *do* work on it, so I assume it's some sort of incompatibility with these particular cards. It's quite possible that it's a signal problem (it's using my PicoMite Backpack PCB which has fairly long signal lines). Interestingly, only the ILI9341 has series termination resistors at the SDcard socket. The breadboard and CMM2 don't and they are working fine.

I'm not going to lose sleep over it. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2642
Posted: 11:52pm 07 Oct 2021
Copy link to clipboard 
Print this post

As an experiment, is it practical to bridge the termination resistors on the display? Or perhaps soldering lower value resistors on top might be better.
Then again if the tracks are longer than usual perhaps replacing the termination resistors with slightly higher values might work. Just trial and error I guess.
Edited 2021-10-08 10:00 by phil99
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 06:38am 08 Oct 2021
Copy link to clipboard 
Print this post

I'd rather not hack he display about too much. After all, the idea of the Backpack is to have something that will work with a standard display. It's been fine with other cards so I'm assuming that these particular types are just incompatible. They probably aren't the only ones!

I intend to try bridging the terminating resistors, just in case they are restricting drive current too much during write. It's the only thing left that's different to the other platforms really - well, that and the length of the PCB tracks, but  although longish they aren't actually terrible on the Backpack.

There was a sort of warning when I bought them, that they wouldn't work with a Nextbase dash cam. I assumed that that was to do with the "looping round" problem that a lot of cards have when they are full, but it may well be something else. I took the risk as they were pretty cheap.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025