2018-10-16 09:48 AM
Hi everybody,
i m facing issues interfacing High Speed SD memory cards.
With low speed type SD card everything look to work well. But when i use fast cards, i got error reads.
The thing is that only appen if the debug is running. Without the debuger attached to my board no problemes appen when using High speed sd cards.
Any one understand what could make the debugger interfer with the application ? Is there somekind of blocking events or interrupt or clock instability because of it that could make the sd card crash ?
tanks.
Solved! Go to Solution.
2018-10-17 10:13 AM
Probleme solved:
The clock signal was a bit dirty. I added a filter at the end of the clock signal
100ohm in series with 100pF connected to 3V3.
It work now like a charm.
Tanks you for helping :)
2018-10-16 09:55 AM
Don't memory view the SDIO/SDMMC FIFO, this will break things. See also Peripheral View.
Polled mode has serious issues with interrupt and bus loading, use DMA, always.
2018-10-16 09:58 AM
Yes you are right i use polled SDIO mode.
Maby i would be safer use DMA mode.
2018-10-16 11:28 AM
i m now using the DMA to read the card.
But there is still a probleme after few reads when debugger attached.
I m suspecting EMC probleme.. dont know..
2018-10-16 11:39 AM
Whose debugger are you using? OpenOCD?
Using Keil here, and really not suffering from issues on any of the F4, L4, F7 and H7 in current use, and working with bus speeds >60MHz >30MBps
Would recommend pull-up resistors (33-47K) on D[0..3] and CMD pins close to socket.
2018-10-16 10:51 PM
> But there is still a probleme after few reads when debugger attached.
> I m suspecting EMC probleme.. dont know..
I wouln't think so.
EMI problems would manifest regardless of the debugger.
Except you have both PCB tracks very close, and missing proper pull-ups on SDIO lines, as Clive suggested.
2018-10-17 04:33 AM
I have tryed with and without pullup.
I have shortened wires as much as possible, and added 3 capacitors close to 3v3. ( 10n, 100n and 100µ).
I have got no probleme reading a class 1 sd card, when using class 10. It still crash after some reads.
2018-10-17 04:35 AM
I supsected EMI because i have pointed that when probing clock signal, it was working longer without crashing.
And also, when touching the card adapter with my hand while working, it was make things gooing beter too.
2018-10-17 04:36 AM
The hardware i use is a Nucleo discovery board with a sd micro sd card adapter wired to it.
2018-10-17 05:59 AM
What board/chip are we talking about here, lets narrow things down a bit.
For short traces you might want to back off on the slew rate, from say the VERY HIGH, to HIGH or MEDIUM settings.
Here I've done writes and read back tests on the entire space of 200 and 400 GB cards, the run time here is quite significant.