2013-09-05 05:11 PM
Hello guys,
I have a question for : Question for STM32 USB Full Speed Device Library V2.2.1 How can I use SD card on Mass_storage demos ? is it connected via SPI or SDIO ? or I can choose ? and how can I connect my USB to it ? where can I find the configuration for it ? I have PA11 and PA12 connected to USB port. Thanks a lot2013-09-08 06:06 AM
Please correct me if I'm wrong thank you
I would appear to have confirmed the connectivity. You should evaluate the SDIO functionality outside the context of the USB MSC.2013-09-09 06:56 AM
2013-09-09 07:51 AM
I can't find CD pin on my SD card, is it optional ? or a must for SDIO ?
2013-09-09 09:06 AM
I don't see a schematic, looking at the silk-screen suggests SPI, so no
The CD (Card Detect) is not on the CARD, but the SOCKET, it is a switch actuated by the card when isserted. This SOFTWARE may check this pin, and then not try to initialize/communicate with it. If you don't have the CD, then you'll need to defeat the testing for it. I used the following with the STM32F4-Discovery2013-09-09 09:57 AM
For the full size cards, I like
http://www.jianpingusa.com/SDMMC.asp
http://www.jianpingusa.com/datasheet/breakoutboard.pdf
2013-09-10 05:13 AM
2013-09-10 06:55 AM
Hard for me to judge, I think there's enough material there to work with.
The switch typically makes to ground when the card is inserted, but rather than wire it up one could simply defeat the test within the code.2013-09-11 08:37 AM
so just make it CD = 0 in the code then...?
I just make : GPIO_ResetBits(SD_DETECT_GPIO_PORT, SD_DETECT_PIN); // set pin low windows can detect it but can't read the SD yet....any ideas why ? thanks2013-09-11 08:49 AM
No, defeat the test, for example by not doing it, and always returning SD_PRESENT?
/**
* @brief Detect if SD card is correctly plugged in the memory slot.
* @param None
* @retval Return if SD is detected or not
*/
uint8_t SD_Detect(void)
{
__IO uint8_t status = SD_PRESENT;
/*!< Check GPIO to detect SD */
if (GPIO_ReadInputDataBit(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) != Bit_RESET)
{
status = SD_NOT_PRESENT;
}
return status;
}
2013-09-12 04:30 AM
so just make it CD = 0 in the code then...?
I just make : GPIO_ResetBits(SD_DETECT_GPIO_PORT, SD_DETECT_PIN); // set pin low
AGAIN NO, Does that even make the pin low? The pin is in input mode.uint8_t SD_Detect(void)
{
return SD_PRESENT;
}