cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO busy detect?

hfs99
Associate II
Posted on April 30, 2011 at 16:58

SDIO busy detect?

1 REPLY 1
aqueisser
Senior
Posted on May 17, 2011 at 14:33

Hi Hugh,

DAT0 busy signalling is a standard part of SD/SDIO/MMC specs so I assume that support for that feature is part of the SDIO controller on the STM32. I've seen my card do that on multiple-block reads.

I'm pretty sure you can read the input line even if it's configured as an AFIO but with SDIO it's hard because the data lines switch direction under control of the peripheral. When you're doing a read the data lines should stay inputs from the time you send the command to the completion so it should be ok. I've never tried it, though, I always use a logic analyzer on the SDIO lines for exploration.

I've had trouble with the STOP_TRANSMISSION command, luckily I'm using eMMC which supports setting the number of blocks ahead of the multiple read/write command. SDIO also supports that feature but SD might not. It's probably worth checking whether the card you use has such a feature. For reads it's easier to send one command ahead of time than dealing with the timing of the STOP command since you can't really control what the card is sending although you can stop the clock, if you want. It's probably easier to just let the FIFO overrun when you're not interested in any more data.

For writes it's pretty easy since it's up to your code to set up the SDIO and DMA peripherals ahead of time and just send the stop command when you're done.

Andrew