Pin configuration (to enable SPI) on STM32 Nucleo

Hi @chrisX12,

In the past months, I’ve been using SimpleFOC with SPI on Nucleo+Arduino, Nucleo+PlatformIO and Nucleo+STM32CubeMX. Every combination works, so don’t loose faith.

However, I strongly advise against going the Nucleo+STM32CubeMX way. It requires porting the STM32duino library to STM32CubeMX, which is tricky and undocumented.

I suggest you get back to Nucleo+Arduino, you’ll get more help on this forum and I can tell you it works, with the same SPI pins (PA5, PA6, PA7).

Plesae try the magnetic_sensor_spi example with an additional _delay(20) in the loop. Maybe the “noise” you get is just your Nucleo being too fast to provide a meaningful deltaT (see this topic).