Skip to main content
Visitor II
March 31, 2021
Solved

Pins for STM32 UART Bootloader communication?

  • March 31, 2021
  • 2 replies
  • 6850 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

    Graduate II
    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.

    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

    MFord.1Author
    Visitor II
    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