stm32f4xx-hal
stm32f4xx-hal copied to clipboard
SPI3 does not work on stm32f405
I'm trying to use the SPI3 bus (alongside SPI1 and SPI2, which both work fine), however the clock does not seem to be activated.
[dependencies.stm32f4xx-hal]
version = "0.17"
# git = "https://github.com/stm32-rs/stm32f4xx-hal"
features = ["rt", "stm32f405", "usb_fs","spi3"] # replace the model of your microcontroller here
// initialize SPI3 for FLASH MEMORY
let sclk_3 = gpioc.pc10.into_alternate().speed(Speed::VeryHigh);
let sdo_3 = gpioc.pc11.into_alternate().speed(Speed::VeryHigh);
let sdi_3 = gpioc.pc12.into_alternate().speed(Speed::VeryHigh);
let spi3 = dp
.SPI3
.spi((sclk_3, sdo_3, sdi_3), MODE_0, 10.kHz(), &clocks);