cancel
Showing results for 
Search instead for 
Did you mean: 

Re: SPI and I2C Pin Conflict Issue on STM32F103CBT6

WangXu
Associate

WangXu_0-1735103957105.png

(translated)
I encountered the exact same problem. I2C and SPI can be used independently. When used together, SPI cannot communicate, but I2C works fine.

After commenting out the I2C initialization, SPI can be used normally. The chip model is STM32F103CBT6.

WangXu_1-1735104193718.png

My current product doesn't work properly~, it seems I need to change the pinout.

 

EDIT by ST Moderator: Post translated in English and moved to a new thread with right labels, instead of re-posting it in an old thread that doesn't have the same problem.

 

1 REPLY 1
Imen.D
ST Employee

Hello @WangXu 

Check if you have the condition described as a limitation in STM32F101x4/6, STM32F102x4/6, STM32F103x4/6 device errata: "I2C1 with SPI1 remapped and used in master mode".

The workaround provided there is:

  • Do not use SPI1 remapped in master mode and I2C1 together.
  • When using SPI1 remapped, the I2C1 clock must be disabled.

ImenD_0-1735289193211.png

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen