diff --git a/firmware/targets/f4/Src/spi.c b/firmware/targets/f4/Src/spi.c index d1fd0669..8fe11eaa 100644 --- a/firmware/targets/f4/Src/spi.c +++ b/firmware/targets/f4/Src/spi.c @@ -156,21 +156,21 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle) // SD Card need faster spi gpio GPIO_InitStruct.Pin = GPIO_PIN_2; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); GPIO_InitStruct.Pin = SPI_D_MOSI_Pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; HAL_GPIO_Init(SPI_D_MOSI_GPIO_Port, &GPIO_InitStruct); GPIO_InitStruct.Pin = SPI_D_SCK_Pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; HAL_GPIO_Init(SPI_D_SCK_GPIO_Port, &GPIO_InitStruct); diff --git a/firmware/targets/f4/api-hal/api-hal-spi-config.c b/firmware/targets/f4/api-hal/api-hal-spi-config.c index 792df528..7751b2a1 100644 --- a/firmware/targets/f4/api-hal/api-hal-spi-config.c +++ b/firmware/targets/f4/api-hal/api-hal-spi-config.c @@ -37,7 +37,7 @@ const SPIDevice sd_slow_spi = { .CLKPolarity = SPI_POLARITY_LOW, .CLKPhase = SPI_PHASE_1EDGE, .NSS = SPI_NSS_SOFT, - .BaudRatePrescaler = SPI_BAUDRATEPRESCALER_256, + .BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32, .FirstBit = SPI_FIRSTBIT_MSB, .TIMode = SPI_TIMODE_DISABLE, .CRCCalculation = SPI_CRCCALCULATION_DISABLE,