Associate II
April 11, 2020
Solved
I am trying to use SPI2 on an STM32F407 processor and can’t get it to work.
- April 11, 2020
- 6 replies
- 3131 views
I am using SPI1 to communicate with an IMU, which work perfectly. I used the same initialization code for SPI2 making changes for SPI2 and initialize PB13, PB14 and PB15 as SCLK, MISO and MOSI. It doesn’t work and I have run out of ideas. When SPI1 is initialized its SCLK pin immediately goes high, clock is high at idle, but when SPI2 is initialized its SCLK pin never goes high. I have tried initializing PB13 as an individual port and it works fine, goes high when set high and low when set low. So, it appears the hardware is OK. I have also eliminated all the rest of the code, still doesn’t work. I tried using other pins for SPI2, they don’t work either. My SPI2 Init is attached.
