cancel
Showing results for 
Search instead for 
Did you mean: 

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

AWats
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

4 REPLIES 4

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
Associate II

Hey JW, thanks for answer.

It's STM32L4S. I have BOOT0=0.

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
Associate II

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