0

I am a newbie to STM32 and CubeMX. I need to create 3 UART interface and 2 I2C interface in STM32F103C8T6. I tried to, but there is a common port for both i2c and uart communication and it allows me to create only (2 uart and 2 i2c) or (3 uart and 1 i2c ) and I couldn't create as I needed . how can I establish 3 UART and 2 I2C interface at a same time in STM32F103C8T6 ?

Thanks in advance...

Vignesh
  • 55
  • 3
  • 12

2 Answers2

3

You can't. There's an unresolvable pin conflict.

The I2C2 peripheral must use pins PB10 and PB11 for SDA and SCL -- there are no remappings for this peripheral.

The USART3 peripheral uses those pins for TX and RX. On higher pin-count STM32F1 parts, it can be remapped to pins PC10/PC11 or PD8/PD9; however, the STM32F103C8 doesn't have those pins.

There are only two I2C and three USART peripherals on the STM32F103, so there are no alternate I2C or USART peripherals available.

1

use hardware I2C and as many as possible hardware UARTS. For the additional ones write the software implementation. You have an example here: https://www.st.com/resource/en/application_note/dm00110292.pdf or take stm32F103 with more pins

0___________
  • 60,014
  • 4
  • 34
  • 74