Skip to main content
Johannes Hofmann
Associate II
June 25, 2018
Question

STM32L011F4: GPIO configuration after reset(not programmed)

  • June 25, 2018
  • 4 replies
  • 2652 views
Posted on June 25, 2018 at 20:08

Hello,

I have the problem that apparently PA9 is in HIGH state after applying the supply voltage to my circuit.

0690X0000060Bt6QAE.png

The problem is, that it is connected to the gate of a N-Channel FET which you can see in this image shorts the supply voltage to ground right from the start, making it unable to communicate with the MCU.

0690X0000060BsDQAU.png

I searched in the reference manual but from my understanding that very pin should be in Reset start after power up with no pull up/down.

In the Alternate functions section for that pin it seems that it has AF0 as reset function which is related to ''MCO'', which means that a clock is output on that pin. But in RCC_CFGR it is stated that in reset state there is no clock output on that pin.

So can anyone tell me why there's VDD present on PA9?

Thanks in advance.

Hannes

#reset #stm32l011
This topic has been closed for replies.

4 replies

waclawek.jan
Super User
June 26, 2018
Posted on June 26, 2018 at 10:50

If unprogrammed, some of the newer STM32 go into bootloader upon reset. See AN2606.

Isn't PA9 related to some of the bootloader interfaces? Is it switched to VDD 'hard', or is it an internal pullup?

JW

Johannes Hofmann
Associate II
June 26, 2018
Posted on June 26, 2018 at 11:32

On page 194 of that application note it says:

0690X0000060KgyQAE.png

Does ''Output'' then mean that VDD is applied at that pin?

waclawek.jan
Super User
June 26, 2018
Posted on June 26, 2018 at 12:11

The bootloader first does nothing just  'listens' on the *Rx* pin (i.e. PA10). If it 'sees' 1->0->1 transition there (with some rough measurement of the timing), it then enables the USART and switches the USART pins in GPIO to AF - which for Tx means 1 initially (as that's the idle state of USART Tx).

From your schematics I can't determine whether such 1->0->1 transition may be present on PA10. You may want to keep the mcu in reset until programmed.

JW