Skip to main content
MFord.1
Associate III
March 31, 2021
Solved

Pins for STM32 UART Bootloader communication?

  • March 31, 2021
  • 2 replies
  • 9680 views

Hi,

I have been reading through documentation for the ST UART bootloader on the STM32F091cc chip. I want to use UART2 as my UART for both standard serial communication and FW updates.

UART2 can use pins (PA2,PA3) or (PA14, PA15). I would like to be able to use PA2 and PA3 because PA14 overlaps the SYS_SWCLK and I would like to be able to use SWD and UART at the same time.

I have successfully talked to the bootloader over PA14 and PA15, and there is a discrepancy in documentation that is making me hesitant to move to PA2and PA3. PCB is not easy to hack up or else I'd jump some pins and try.

0693W000008yPUrQAM.pngThis is from the AN2606 Application note and mentions both pin sets for the STM32F09xxx device bootloader.

0693W000008yPVuQAM.pngThis is from the STM32F091xC  data sheet. It only mentions PA14/PA15.

Does anyone have any idea which one is correct? Could you use both pin sets for UART2 to talk to the bootloader? Or only the PA14,PA15 set?

Thank you for your help.

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

Hello @MFord.1​ ,

Both PA2/PA3 & PA14/PA15 can be used for USART2 as on AN2606.

I'm checking the DS and I will forward your feedback internally to update it.

 Imen

2 replies

Tesla DeLorean
Guru
March 31, 2021

Not a part I'm using.

I will note that the input pins are initially fed to a TIM to measure the baud via the 0x7F bit pattern. Once it sees this it should switch to the appropriate pairs and emit the response pattern.

You could disassemble the ROM code and check what it is doing, and on which pins.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Imen.DAnswer
Technical Moderator
April 1, 2021

Hello @MFord.1​ ,

Both PA2/PA3 & PA14/PA15 can be used for USART2 as on AN2606.

I'm checking the DS and I will forward your feedback internally to update it.

 Imen

When your question is answered, please close this topic by clicking "Accept as Solution".Thanks Imen
MFord.1
MFord.1Author
Associate III
April 1, 2021

Thank you Imen!

I just wanted to clarify that you mean both PA2/PA3 and PA14/PA15 can be used to activate/talk to the bootloader, correct? I know they can both be used for USART2 in general.

Thank you again.

Technical Moderator
April 1, 2021

Yes, that's correct.

Imen

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