STM32F405 MicroMod SPI

Hello,

I’m wondering if anyone has encountered any peculiarities with using SPI on the STM32 micromod board and the ATP carrier?

I’m trying to get my STM32 micromod board talking with an MPU-6500 using this library:

https://github.com/bolderflight/invensense-imu

I’m using the ATP board with the CS, SCK, COPI, and CIPO pins. I’m constructing the object using:

bfs::Mpu6500 imu(&SPI, PC4);

I validated my wiring and the sensor by using a Teensy micromod board with the following construction:

bfs::Mpu6500 imu(&SPI, 10);

The Teensy micromod board is able to read the sensor fine. The STM32 micromod board is not. I checked that Teensy micromod pin 10 is the same as STM32 micromod pin PC4 using an LED and digitalWrite. At this point, I’m guessing there’s some difference in the pinout of SPI between the two micromod boards, but I thought I would check here first.

Thanks!

I had assumed that the SPI pins on the ATP board were the default SPI pins in the software, but that assumption was incorrect. By explicitly assigning the SPI pins, this worked:

  SPI.setMISO(PA6);
  SPI.setMOSI(PA7);
  SPI.setSCLK(PA5);
  SPI.begin();