cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 SDIO conflict with debuger opperations

Julien Bouille
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Julien Bouille
Associate III

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 :)

View solution in original post

23 REPLIES 23

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Julien Bouille
Associate III

Yes you are right i use polled SDIO mode.

Maby i would be safer use DMA mode.

Julien Bouille
Associate III

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..

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AvaTar
Lead

> 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.

Julien Bouille
Associate III

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.

Julien Bouille
Associate III

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.

Julien Bouille
Associate III

The hardware i use is a Nucleo discovery board with a sd micro sd card adapter wired to it.

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..