cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C0 bootloader UART pin assignment

akurtj
Associate

Hello,

I have a question regarding the bootloader of the STM32C0 (especially the TSSOP 20 version STM32C031F6Px).

According to the datasheet and the reference manual, the bootloader can communicate via UART1 and I2C1.

The pins it is using are PA9&PA10. These pins are mapped to PA11&PA12.

 

But if I configure UART1 in CubeMX, UART1 is not and can't be assigned to these pins.

Could somebody please explain:

  • How to do the configuration of using UART1 as the communication interface for the bootloader in CubeMX?
  • What happens and how to deal with the situation that I have assigned some other STM32 peripheral to PA11&PA12 and the triggering the bootloader? Is UART1 then remapped to these pins even it was on other pins before the bootloader?
  • How is this remapping of the pins PA9/PA10 to PA11/PA12 done?

BR,

      Andreas

1 ACCEPTED SOLUTION

Accepted Solutions
akurtj
Associate

Hello @Sarra.S 

thanks for the reply.

I was searching around 🙂 in CubeMX and found the following to configure the mapping of UART1 to PA9/PA10:

CubeMX_C031_UART1.png

 

 

 

 

 

 

First, you have to configure the remapping under System Core -> SYS.

Afterwards, you can map the UART1 peripheral to the PA9/PA10 pins.

Let's see what CubeMX makes out of it.

I hope it helps other users.

BR,

     Andreas

View solution in original post

2 REPLIES 2
Sarra.S
ST Employee

Hello @akurtj 

>>How to do the configuration of using UART1 as the communication interface for the bootloader in CubeMX?

SarraS_0-1706522889554.png

>>What happens and how to deal with the situation that I have assigned some other STM32 peripheral to PA11&PA12 and the triggering the bootloader? Is UART1 then remapped to these pins even it was on other pins before the bootloader?

if you're using USART on pins PA9/PA10 without remapping, it won't be an issue, otherwise, RMP bits must be kept at 0 to prevent conflict due to two GPIO outputs with different output levels connected to the same pin.

>>How is this remapping of the pins PA9/PA10 to PA11/PA12 done?

PA12_RMP in SYSCFG must be set to remap the PA12 pin to operate as PA10 GPIO port, instead of PA12 GPIO port. 

PA11_RMP in SYSCFG must be set to remap the PA11 pin to operate as PA9 GPIO port, instead of PA11 GPIO port.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

akurtj
Associate

Hello @Sarra.S 

thanks for the reply.

I was searching around 🙂 in CubeMX and found the following to configure the mapping of UART1 to PA9/PA10:

CubeMX_C031_UART1.png

 

 

 

 

 

 

First, you have to configure the remapping under System Core -> SYS.

Afterwards, you can map the UART1 peripheral to the PA9/PA10 pins.

Let's see what CubeMX makes out of it.

I hope it helps other users.

BR,

     Andreas