2021-08-16 12:34 PM
I'm trying to run FAT over SD MMC. But it does not work in SD initial stage... I'm using CubeMX.
The simplest one code:
status = HAL_SD_Init(&hsd1);
if(status != HAL_OK)
{
debug_print_message("---SD card initialize failed!\n");
HAL_Delay(100);
}
else
{
debug_print_message("++++SD card initialized!\n");
HAL_Delay(100);
}
HAL_SD_Init() from stm32l5xx_hal_sd.c - it was generated by CubeMX.
Debug mode shows SD CRC error - HAL_SD_ERROR_DATA_CRC_FAIL
Logic Analyzer shows some communication - card answer:
Initial clock 400 kHz, some request and replay.
Solved! Go to Solution.
2021-09-14 01:47 AM
Oscilloscope says - you should soldering better... Problem was in soldering.
Some bytes a going to grey level. After repairing - SD card inited successfully.
2021-08-16 12:44 PM
What's the circuit look like? Pull-ups? Series resistors? 1-bit or 4-bit?
Some specific cards, or all?
2021-08-17 11:43 PM
Circuit looks like - pull up to logic 3.3V 110k, RC filter 33pF (to GND) 22R (serial). Bus - 1-bit.
When card is removed - no data on D0. When installed - the pic below. Timings looks nice - 1 bit strict 2.5 us.
SD card - some one from nearest store - Mirex micro sd hc 8 GB. iMAC see it.
2021-09-14 01:47 AM
Oscilloscope says - you should soldering better... Problem was in soldering.
Some bytes a going to grey level. After repairing - SD card inited successfully.