cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with using SPI and I2C together

ledi001
Associate III

Hi,

i am using a NUCLEO STM32L412 board and i want to use SPI and I2C together.

Every bus works for itself - this is OK.

But when i measure the signals, i get SPI clock signal on SDA and vice versa the SDA Signal on SPI SCK. I initialized with CubeMx.

Here my connections:

PA12 - SPI1 MOSI

PA11 - SPI MISO

PA5 - SPI SCK

PB6 - I2C SCL

PB6 - I2C SCL

Attached a scope image (SPI CLK = channel 2)

3 REPLIES 3

>>NUCLEO STM32L412 

Which ONE, the 64-pin NUCLEO-L412RB or 32-pin NUCLEO-L412KB?

Check what code CubeMX generated, and the Alternate Function associated against each pin vs documentation in the Data Sheet.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
S.Ma
Principal

check the schematics, there maybe some solder bridge options and maybe an "arduino" LED on SCK which may drop the voltage amplitude.

It is the 32-pin...