cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L011F4: GPIO configuration after reset(not programmed)

Johannes Hofmann
Associate II
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
4 REPLIES 4
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

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?

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

Posted on June 26, 2018 at 18:38

That Rx-sequence can be excluded as these 2 pins are connected to the Gates of a P-N-Dual-Mosfet.

The problem I'm facing now is if I solder an additional cable to the reset pin and connect this to the ST-Link's RST-pin, it isn't able to connect because my circuit draws to much current which fails the ST-link. 

And if I hold the reset-line LOW manually, the ST-link utility tells me 0690X0000060LCsQAM.png

It only works if I remove the Reset-line from GND during a connection attempt. Then it get's a successful connection. Once the connection is established it connects again if i hit connect again.