Skip to main content
PGall.4
Associate
Apr 4, 2023 10:25 AM UTC
Solved

Hi everyone! I want to know when the MCU STM32L4A is in system bootloader (by using a LED). Is this possible? Many thanks!

..

This topic has been closed for replies.
Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
Apr 4, 2023 12:10 PM UTC

Welcome, @PGall.4​, to the community!

If you are talking about the internal bootloader in each STM32, its activity cannot be indicated with an LED.

However, if you write your own bootloader, you have all the freedom, but also the disadvantage of losing user flash.

Does it answer your question?

Regards

/Peter

In order 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.

6 replies

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
Apr 4, 2023 12:10 PM UTC

Welcome, @PGall.4​, to the community!

If you are talking about the internal bootloader in each STM32, its activity cannot be indicated with an LED.

However, if you write your own bootloader, you have all the freedom, but also the disadvantage of losing user flash.

Does it answer your question?

Regards

/Peter

In order 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.
Tesla DeLorean
Guru
Apr 4, 2023 12:17 PM UTC

Have a GPIO / LED that lights after reset​, have your code clear it.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Peter BENSCH
ST Technical Moderator
Apr 4, 2023 1:13 PM UTC

Good idea, but requires a little extra hardware, e.g. an external flipflop.

In order 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.
PGall.4
PGall.4Author
Associate
Apr 4, 2023 12:17 PM UTC

Hi Peter!

Yes, I was talking about internal bootloader. We wanted to ensure that the MCU wasn't in that state with a visual indication,

Many thanks!

waclawek.jan
Super User
Jun 12, 2023 2:34 PM UTC

I know this is a 2 month old thread resurrected probably by this badly handled spamming wave, but maybe this is a topic worth another answer.

The default bootloader sets pullups/pulldowns on some pins. AN2606 probably does not deal with this adequately and ST for whatever weird reason refuses to publish the bootloader sources, but you can disassemble/single-step the bootloader to see which ones - e.g. UART Rx pins. The pullups/pulldowns are nominally 40kOhm, and these days there are LEDs out there which light up quite adequately with currents like that.

Whether it's worth to spend a pin on this function is a question for OP to decide.

JW

Peter BENSCH
ST Technical Moderator
Jun 12, 2023 2:58 PM UTC

Very good idea that is worth pursuing.

In order 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.