Skip to main content
Visitor II
December 25, 2024
Solved

Re: SPI and I2C Pin Conflict Issue on STM32F103CBT6

  • December 25, 2024
  • 1 reply
  • 697 views

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.

 

    This topic has been closed for replies.
    Best answer by Imen.D

    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

     

    1 reply

    Imen.DAnswer
    Technical Moderator
    December 27, 2024

    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