Skip to main content
Visitor II
December 15, 2019
Question

Can USARTs with non default pins be used for accessing the bootloader

  • December 15, 2019
  • 5 replies
  • 1121 views

The question at https://community.st.com/s/question/0D50X00009XkeGq/what-usarts-can-be-used-for-boot-on-64pin-stm32f401rct6-stm32f401xbc?t=1576434345679 was left unanswered. The words "The USART2 uses its remapped pins" in AN2606 gives the impression that non default pins can be used to access the bootloader. Is this the case? If so, how is it done?

    This topic has been closed for replies.

    5 replies

    Visitor II
    December 15, 2019

    Thats a great question.

    I actually wondered the same when I was designing my SPI bootloader pinouts on SPI4, I added a series on transmit pin of the chip that is being booted, since it cant have its slew rate controlled and default value is unknown to me, since it was 82mm it could cause reflection if slew is very fast I figured ok I'll be extra careful and plan for the worst.

    I also said to myself NOOOO remapping.

    Graduate II
    December 15, 2019

    I think the answer was you can't use USART2 PA2/PA3, perhaps you don't like the answer, but it was one.

    Visitor II
    December 15, 2019

    I like your haircut, is that you?

    You look like a badass.

    Super User
    December 15, 2019

    I guess the expression "remapped pins" comes as a relic from the 'F1's GPIO/AFIO architecture. It probably shouldn't be formulated in that way for any other family.

    IMO AN2606 is quite clear in describing which pins are used for the factory bootloader.

    JW

    CR.11Author
    Visitor II
    December 15, 2019

    Thanks for the quick responses. The wording did provide a glimmer of hope but I did suspect that it wasn't possible. With regards to whether its clear enough. Clearly not. I'm not the first person to ask this question. Its quite an important limitation. Cube IDE makes it very easy to choose pins that would work fine in application code but not with the bootloader. It does this automatically if you have happened to have already used them for something else. If I were writing AN2606 I would certainly clarify that all USART bootloaders support default pins only and remove the "remapped pins" line if it no longer applies.

    Visitor II
    December 15, 2019

    Yeah well, as a self taught programmer with not much experience I wondered to myself, how can the micro know what its supposed to do in an absolute vacuum of information after a reset or in its default config?

    That documents makes it even more obvious.