2011-06-08 07:57 AM
Has anyone successfully worked with driving SD card with SDIO_CK over 25MHz?
I'm working on a SD card project. I'm trying to increase SDIO_CK up to 48MHz. but I keep receive SD_ERROR 3 ''SD_CMD_RSP_TIMEOUT ''. SD card is V2.0. I am using CMD6 to switch to high speed mode. Response data shows switch is done. but following command gets SD_ERROR 3. Any ideas? JZ #sdio-standard-peripheral-library-stm32 #sdio2011-06-08 08:31 AM
Have you checked the bus timing using a scope? We've found the critical timing seems to be when the CPU is doing a read from the card. Make sure the data setup time for the processor is being obeyed.
2011-06-15 04:35 AM
I have
exactly
the same
problem
(for
STM32F207
)
.
I'm unable
to
start the
transmission of
48MHz
with
the card.
I have
built
my own
sources
, and
only
some
modeled
by the solutions
of
StdPeriphLib
.
Card
switches to
HighSpeed
properly
.After switching on
the
BYPASS
bit
SDIO_CLKCR
,
communication
crashes
on
SD_CMD_RSP_TIMEOUT
or
SD_DATA_TIMEOUT
.
SDIO
I've configured
to
work
with the
DMA
without
interrupts
,
only the
pooling
flags
.
PCLK2
=
60MHz
so
good.
When
BYPASS
is disabled, the
24MHz
transmission
works
very
well
.
I can not
find the
causes
for this
.
2011-06-15 07:37 AM
How is the STM32 physically interfacing to the card? Is there a level converter between the processor and the card, or is the card directly wired to the processor?
2011-06-15 03:09 PM
do I need a level converter? since the SD card works fine with 24MHz with SDIO interface to it directly. I don't see any reason why need a level converter. if there is, I would like to hear.
JZ2011-06-16 03:17 AM
Have you seen this post about timing issues in the ST code:
/3b73403f
2011-06-16 10:54 AM
Yes,
I've seen.
But this is not
the problem.
First
rule,
I dont build
such structures
,
but
overall
lean
timeouts
independent
countdown
timer
on
the system
.
Secondly
, this feature
CmdError
is called
only once
during
initialization
when the
SDIO
works at
400kHz
.
The problem
appears only after
the switch
SDIO
to
48MHz
, and this is
an internal
timeout
registrer
SDIO_STA
.
Setting the
timeout
higher values
do
not change.
The controller
simply
not sent
or receive
data.
2011-06-21 08:51 AM
Permit me to ask a second time: have you checked your bus timing with an oscilloscope?
On our board, we've found it's not possible to reliably exceed 20 MHz due to timing on the read cycle. That's with our hardware - yours will no doubt be different. You should certainly be able to hook up a scope or logic analyzer and watch the bus transfers. After all, the SD bus is only 6 lines.