cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L486VGT6 - Port mapping during Bootloader state

NirAlon
Associate III

Hello everyone,

In my project, I am using the STM32L486VGT6 microcontroller to manage several hardware peripherals. Additionally, I plan to utilize the bootloader feature to flash the code via the USBFS interface.

As we know, when the MCU enters bootloader mode, various peripherals (such as UART, SPI, USB, etc.) are enabled by default.

"Enable state" on these pins could be caused either by an output set to high or an input pin with a pull-up resistor enabled, and I wish to avoid both options.

To better understand which ports are active and which are not, I am mapping all of the MCU’s ports. This will help me identify which I/O pins are available for use without interfering with the activation of other peripherals during bootloader mode. Furthermore, it will help avoid the risk of unintentionally supplying voltage to peripherals that do not have an active VCC.

To map the MCU ports, I’ve fabricated this PCB:

NirAlon_0-1733567896038.png

NirAlon_1-1733567915738.png

 

The PCB includes the following components:

  • 3V power supply
  • USB FS interface
  • SWD, Reset, and BOOT0 pins
  • 12MHz HSE crystal

All other ports are connected to test pads, as shown in the design.

 

After mapping all the ports during bootloader mode, I observed the following ports changing from 0V to 3V:

  • PA2, PA3
  • PC10, PC11
  • PB8, PB9
  • PA6
  • PB14

I compared my results with the information provided in AN2606 (STM32 Microcontroller System Memory Boot Mode), specifically on page 352. According to the app note:

  • USART2 (PA2, PA3) is enabled.
  • USART3 (PC10, PC11) is also enabled.

However, there is no explanation for why PB8, PB9, PA6, and PB14 are in a high state during bootloader mode.

Can anybody explain why are PB8, PB9, PA6, and PB14 being driven high during bootloader mode, even though they don’t seem to correspond to any enabled peripherals mentioned in the documentation?

I’d appreciate any insights or suggestions on what might be causing this behavior.

Best regards

Nir

4 REPLIES 4

You probably have bootloader v9 - that's described further on in AN2606.

AN2606 also says, that bootloader v10 is in 'L476/486 rev.3 and bootloader v9 is in rev.4. Don't ask me, why...

What you see in most cases is a pin not being pulled hard up, but only through the internal nominally 40kOhm pullup. Exceptions are probably the SPIx_MOSI pins, PA6 and PB14, which are probably pulled hard. PB8/PB9 is for CAN.

I'd expect you to see also PA9/PA10 pins being pulled up (for USART1).

JW

 

Hi JW,

Thanks for your reply.

I have triple-checked, but PA9 and PA10 are not active. Is it possible that their behavior could differ between packages or revisions?

This is why I always fabricate a test board, as I’ve found that in many cases, there is no direct correlation between application note data and real-world testing.

Regarding your comment on the 40kΩ internal pull-up:
Even though it’s nominally 40kΩ, I’ve seen cases where this is enough to inadvertently activate other peripherals, such as the LDO enable pin, for instance.

Anyway, I appreciate your help on this!

Best regards,
Nir

TL;DR If the built-in bootloader does not do what you need - make sure that it won't activate at all (by the BOOT0 pin). Then make your own bootloader that behaves as you want.

 

Sorry I overlooked that AN2606 says indeed that PA9 and PA10 are without the pullup.

JW