STM32 SDIO conflict with debuger opperations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-16 9: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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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 :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-16 9: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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-16 9:58 AM
Yes you are right i use polled SDIO mode.
Maby i would be safer use DMA mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-17 4: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-17 4: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-17 4:36 AM
The hardware i use is a Nucleo discovery board with a sd micro sd card adapter wired to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-17 5: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.
Up vote any posts that you find helpful, it shows what's working..
