diff --git a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/board.cpp b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/board.cpp index a24fa957b4..c102dd1243 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/board.cpp +++ b/libraries/AP_HAL_F4Light/boards/f4light_AirbotV2/board.cpp @@ -166,7 +166,7 @@ extern const struct TIM_Channel PWM_Channels[] __FLASH__ = { extern const SPIDesc spi_device_table[] = { // different SPI tables per board subtype // name device bus mode cs_pin speed_low speed_high dma priority { BOARD_INS_MPU60x0_NAME, _SPI1, 1, SPI_MODE_0, BOARD_MPU6000_CS_PIN, SPI_1_125MHZ, SPI_9MHZ, SPI_TRANSFER_DMA, DMA_Priority_VeryHigh, 1, 5 }, - { BOARD_SDCARD_NAME, _SPI2, 2, SPI_MODE_0, 255, SPI_1_125MHZ, SPI_18MHZ, SPI_TRANSFER_DMA, DMA_Priority_Medium, 0, 0 }, + { BOARD_SDCARD_NAME, _SPI2, 2, SPI_MODE_3, 255, SPI_1_125MHZ, SPI_18MHZ, SPI_TRANSFER_DMA, DMA_Priority_Medium, 0, 0 }, { HAL_BARO_BMP280_NAME, _SPI3, 3, SPI_MODE_3, BOARD_BMP280_CS_PIN, SPI_1_125MHZ, SPI_9MHZ, SPI_TRANSFER_DMA, DMA_Priority_High, 1, 1 }, { BOARD_OSD_NAME, _SPI3, 3, SPI_MODE_0, BOARD_OSD_CS_PIN, SPI_1_125MHZ, SPI_4_5MHZ, SPI_TRANSFER_DMA, DMA_Priority_Low, 2, 2 }, }; diff --git a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/board.cpp b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/board.cpp index 7f50b0fb78..56a9a2fa5c 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/board.cpp +++ b/libraries/AP_HAL_F4Light/boards/f4light_Revolution_SD/board.cpp @@ -158,7 +158,7 @@ extern const SPIDesc spi_device_table[] = { // different SPI tables per board // name device bus mode cs_pin speed_low speed_high dma priority assert_dly release_dly { BOARD_INS_MPU60x0_NAME, _SPI1, 1, SPI_MODE_0, BOARD_MPU6000_CS_PIN, SPI_1_125MHZ, SPI_9MHZ, SPI_TRANSFER_DMA, DMA_Priority_VeryHigh, 1, 5 }, // { BOARD_DATAFLASH_NAME, _SPI3, 3, SPI_MODE_3, 255 /* caller controls CS */, SPI_1_125MHZ, SPI_18MHZ, SPI_TRANSFER_DMA, DMA_Priority_Medium, 0, 1 }, // we can use dataflash as EEPROM - { BOARD_SDCARD_NAME, _SPI2, 2, SPI_MODE_0, 255, SPI_1_125MHZ, SPI_18MHZ, SPI_TRANSFER_DMA, DMA_Priority_Medium, 0, 1 }, + { BOARD_SDCARD_NAME, _SPI3, 2, SPI_MODE_3, 255, SPI_1_125MHZ, SPI_18MHZ, SPI_TRANSFER_DMA, DMA_Priority_Medium, 0, 1 }, }; extern const uint8_t F4Light_SPI_DEVICE_NUM_DEVICES = ARRAY_SIZE(spi_device_table); diff --git a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.cpp b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.cpp index 875c197dc6..3f75c299dc 100644 --- a/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.cpp +++ b/libraries/AP_HAL_F4Light/boards/f4light_cl_racing/board.cpp @@ -154,7 +154,7 @@ extern const struct TIM_Channel PWM_Channels[] __FLASH__ = { extern const SPIDesc spi_device_table[] = { // different SPI tables per board subtype // name device bus mode cs_pin speed_low speed_high dma priority assert_dly release_dly { BOARD_INS_MPU60x0_NAME, _SPI1, 1, SPI_MODE_0, BOARD_MPU6000_CS_PIN, SPI_1_125MHZ, SPI_9MHZ, SPI_TRANSFER_DMA, DMA_Priority_VeryHigh, 1, 5 }, - { BOARD_SDCARD_NAME, _SPI2, 2, SPI_MODE_0, 255, SPI_562_500KHZ, SPI_36MHZ, SPI_TRANSFER_DMA, DMA_Priority_Medium, 5, 5 }, + { BOARD_SDCARD_NAME, _SPI2, 2, SPI_MODE_3, 255, SPI_562_500KHZ, SPI_36MHZ, SPI_TRANSFER_DMA, DMA_Priority_Medium, 5, 5 }, { BOARD_OSD_NAME, _SPI3, 3, SPI_MODE_0, BOARD_OSD_CS_PIN, SPI_1_125MHZ, SPI_4_5MHZ, SPI_TRANSFER_DMA, DMA_Priority_Low, 2, 2 }, };