Skip to main content
AWats
Associate
January 28, 2020
Solved

Are the internal pull-ups of certain pins (PA2) on STM32L4 applied at first startup?

  • January 28, 2020
  • 4 replies
  • 1552 views

Doing some electrical testing of a board I got back recently and It seems that the internal pullup of pin PA2 is applied at reset. Before flashing the device it seems that this pin is sitting high, and the voltage I see is consistent with the approx 40K of an internal pullup.

PA2 is one of 5 wakeup pins.

Can't see any reference to this pins pullup being engaged by default in the datasheet.

Could it be that the pull-up is engaged by default rather than floating HiZ input as in the datasheet?

This topic has been closed for replies.
Best answer by waclawek.jan

OK so I looked into AN2606 and it appears that all 'L4 run bootloader upon empty FLASH, with PA2 being UART-Tx used in bootloader.

ST does not give away much of the minutiae of tne bootloaders, but according to the 'F4 bootloader's disasm, UARTs are set without pullups initially, and after any 0-to-1 transition occurs on the Rx pin, for *both* Rx and Tx the pullups for that UART are enabled, and the UART is enabled and starts listening for the initial frame.

JW

4 replies

waclawek.jan
Super User
January 28, 2020

Which 'L4?

Some STM32, with FLASH empty and the right combination of pin levels and internal bits, run the built-in bootloader, which may pull up/down some pins, see AN2606.

JW

AWats
AWatsAuthor
Associate
January 28, 2020

Hey JW, thanks for answer.

It's STM32L4S. I have BOOT0=0.

waclawek.jan
waclawek.janBest answer
Super User
January 28, 2020

OK so I looked into AN2606 and it appears that all 'L4 run bootloader upon empty FLASH, with PA2 being UART-Tx used in bootloader.

ST does not give away much of the minutiae of tne bootloaders, but according to the 'F4 bootloader's disasm, UARTs are set without pullups initially, and after any 0-to-1 transition occurs on the Rx pin, for *both* Rx and Tx the pullups for that UART are enabled, and the UART is enabled and starts listening for the initial frame.

JW

AWats
AWatsAuthor
Associate
January 28, 2020

Thanks so much JW, that probably explains what I'm seeing.