2018-10-11 11:25 PM
Hello
I have tried to run a microSD on STM32L4R7ZI and run code from CubeMX 4.26.1 to access the microSD card.
According to SDCard Physical Layer spec the card clock should have a rising edge to signal a valid bit clocked into the card.
But STM32L4 generates a falling edge. This is an image of the card clock and command line just at the beginning of "CMD0" "010000..."
The frequency is correct at 400KHz, but the polarity seems to be wrong .
Is this true? I am wondering, If I am the first one, experiencing that...
Johannes
2018-10-12 05:13 AM
Read out and check content of SDMMC registers, especially SDMMC_CLKCR.
Do you use any transceiver/level conversion?
JW
2018-10-12 08:29 AM
Perhaps we can also bump up the scale here so we can see if the data is valid 5ns before the clock edge
2018-10-29 02:52 AM
I have not used any level translation nor a transceiver
I needed to add U704 (inverter) to the schematic. Only in this configuration, I was able to get the SDCard running. Now it runns perfectly. There was a slight error in the code generation of CubeMX. It generated a faulty callback function. But after having this corrected, the SDCard works properly.
2018-10-29 03:03 AM
Can't say I've had an issue with the L4Rx DISCO or NUCLEO SDMMC but haven't hung a logic analyser on them either.