PC13 (SDIO detect) can handle at most 2MHz speed config.

pull/3/head
Damien 2013-10-30 22:27:38 +00:00
rodzic 5892f4710e
commit 4a14eb0b8d
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -242,6 +242,7 @@ void SD_LowLevel_Init(void)
/*!< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */
// dpgeorge: switch is normally open, connected to VDD when card inserted
GPIO_InitStructure.GPIO_Pin = SD_DETECT_PIN;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; // needs to be 2MHz due to restrictions on PC13
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;
GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStructure);