cancel
Showing results for 
Search instead for 
Did you mean: 

Help for choosing UART pins for bootloader

Arthur21
Associate

Hello,

I'm designing a pcb with a STM32L031 MCU. I will use serial UART2 for bootload and debug.

In ST application note nº2606 and "STM32L031x4 STM32L031x6 datasheet", it is said :

"The boot loader is located in System memory. It is used to reprogram the Flash memory by
using SPI1 (PA4, PA5, PA6, PA7), USART2 (PA2, PA3) or USART2 (PA9, PA10). See
STM32™ microcontroller system memory boot mode AN2606 for details."

My question is : Is it possible to flash the device with USART2 but with USART2_TX located on PA14 and not PA2 ?

My application context makes it mandatory insofar as PA2 is already used for ADC purpose.

Thank you very much for any help !

6 REPLIES 6

No. The firmware is in ROM and not flexible to your needs.

AN2606 defines the pins it can use.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

No, bootloader pins are hard coded and cannot be changed.

If you feel a post has answered your question, please click "Accept as Solution".
MM..1
Chief

@Arthur21 wrote:

My question is : Is it possible to flash the device with USART2 but with USART2_TX located on PA14 and not PA2 ?


Reply is yes you can, but no over system bootloader. Split flash and create custom bootloader.

Ok thanks, I hadn't thought about that.
I am novice in embedded systems. Can you tell me if remapping an ADC channel to another pin is possible ? I didn't succeeded in stmCube UI, I guess it is because of hardware limitations ? Or is it only adefault pin, and a software configuration is possible ?

Thanks

You dont write used package, but ADC channels is static. You have amount of channels based on package and core.

Hello @Arthur21 ,

 

Select another channel for ADC and leave PA2 for the bootloader.

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.