cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL LPUART1 for both Bootloader and AT Commands

Hamady
Associate II

Hamady_0-1747983488598.png

Hamady_1-1747983513094.png



Hello i Have a question about the STM32WL5MOC.

I need to be able to use the bootlader of the WL and in the same UART line use the AT Command.

But it seems that LPUART1 that is the only way to use AT Command Application is not used in the bootloader.

Do you have any idea to have both functionality 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Hamady 

As said @Andrew Neil, the Open bootloader is always an option. But if you are using the LPUART on your trace code and you just want to have only one line (two Pins TX/RX), you can use the LPUART for your application code and the USART2 for the bootloader since the USART2 and the LPUART1 are both using the same pins (PA2 and PA3 as TX and RX) and they don't work simultaneously as said @Andrew Neil . 

Best Regards.

STTwo-32

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.

View solution in original post

4 REPLIES 4
Andrew Neil
Super User

The System Bootloader and your application code are mutually exclusive:

  • While in the System Bootloader, your application code is not running;
  • While running your application code, the System Bootloader is not active.

The choice between System Bootloader and your application code is controlled by the BOOT0 pin.

 

PS:

Application note AN2606STM32 microcontroller system memory boot mode describes the System Bootloader.

You can also jump to the System Bootloader from your application code:

https://community.st.com/t5/stm32-mcus/how-to-jump-to-system-bootloader-from-application-code-on-stm32/ta-p/49424

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Hamady
Associate II

@Andrew Neil 

Thanks for the info 

What i mean is that i can only afford one UART line and be able to use bootloader

Thanks

Yes, the System Bootloader is restricted to use only the specified interfaces; so, as shown in your  table, only USART1 or 2 - not the LPUART.

 

But that doesn't stop you using a custom bootloader on any interface you choose ...

https://community.st.com/t5/stm32-mcus-products/how-can-i-use-an-esp32-to-update-the-firmware-of-an-stm32-from/m-p/696331/highlight/true#M254868

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Hello @Hamady 

As said @Andrew Neil, the Open bootloader is always an option. But if you are using the LPUART on your trace code and you just want to have only one line (two Pins TX/RX), you can use the LPUART for your application code and the USART2 for the bootloader since the USART2 and the LPUART1 are both using the same pins (PA2 and PA3 as TX and RX) and they don't work simultaneously as said @Andrew Neil . 

Best Regards.

STTwo-32

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.