cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476 high current draw before programming

gwillette
Associate II
Posted on January 06, 2017 at 22:16

Our application uses the SMT32L4 in a 4-20mA loop-powered transmitter. VCC on this device is 3V. The typical current draw once the product is operational is approximately 8mA @ 3v. We are utilizing the bootloader to program the mcu with UART1 on pins 68-69 (PA9 and PA10). On some boards, prior to programming, there is approximately 40-50mA current draw on the 3V supply. Our supply is rated for 50mA and once we attempt to initiate bootloading, the current consumption increases beyond that limit. If we provide enough current by increasing the supply, the device programs successfully. Once programmed, the total draw on the 3V supply is the expected 8mA.

I am wondering if there is a known operation/current consumption for these devices before they are initially programmed. Also, I see that the bootloader can use USART1/2/3, I2C1/2/3, and DFU (USB). Which ports/pins are utilized for the USART and I2C channels during bootloader operation? There are several ports that can be configured for each of these channels during normal operation, so it is difficult to determine the exact pin configuration of the device when it is in bootloader mode.

Thank you!

Gary

#programming #high-current #bootloader #stm32
22 REPLIES 22
Posted on January 09, 2017 at 23:02

It could technically be other circuitry on the board, but we have ruled out all connections that may be controlled during bootloader mode. And this high-current scenario only happens in the specific case where there is no application code on the STM32L476. It is very repeatable, and when there is application code present, this high-current scenario does not happen.

The current increase is step-wise. A step at 22mA which holds for 1 sec, then a jump to 75mA which holds for 1 sec, then a jump to 88mA which holds for a short time before dropping almost instantaneously to around 6ma.

Posted on January 09, 2017 at 23:28

Are there significant capacitances to be charged? How exactly are the NRST, VDDA/VSSA, VBAT, VDDIO pins connected? Are all ground pins connected? Is the rise of VDD monotonic?

JW

Posted on January 10, 2017 at 15:14

There are no significant capacitances to be charged, just some 0.1uF caps (at each IC).

NRST connection:

0690X0000060614QAA.png

VDDA/VSSA, VBAT, VDDIO, GND pins (all grounds connected):

0690X00000605wMQAQ.png

In our current test environment, VDD is actually a benchtop power supply capable of sourcing over an amp. It is monotonically increasing.

Here is the rest of the BOOT connection:

0690X00000605zEQAQ.png

I have confirmed that the boot pin is 0V for the duration of the power-up, and that NRST is pulled high shortly after 3V is ready.

gwillette
Associate II
Posted on January 10, 2017 at 17:38

Thanks, will look into it. The battery is a rechargeable which is only used to power the RTC circuitry when +3V is no longer present.

Posted on January 10, 2017 at 17:07

Doesn't applying 1.25V to VREF+ and 3.3V to VDDA (22) violate specification?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 10, 2017 at 17:23

Doesn't applying 1.25V to VREF+ and 3.3V to VDDA (22) violate specification?

Run through the DS/RM and it appears that specifically for the L4 family, no.

PH2 puzzled me a bit, but the pin number relates to VUSB, that should be IMO OK being connected to VDD too.

Sorry, I am out of ideas.

JW

Posted on January 10, 2017 at 17:26

It seems that it does according to my RM0351 section 5.1 Power supplies:

VREF-, VREF+

VREF+ is the input reference voltage for ADCs and DACs. It is also the output of the

internal voltage reference buffer when enabled.

When VDDA < 2 V VREF+ must be equal to VDDA.

When VDDA ≥ 2 V VREF+ must be between 2 V and VDDA.

VREF+ can be grounded when ADC and DAC are not active.

And the DS DocID025976 Rev 4 Section 6.3.1.7 A2D converter characteristics mentions the same.

Posted on January 10, 2017 at 17:34

Indeed. The subscripted 'REF+'  escaped my textual search...  Sorry.

JW

Posted on January 10, 2017 at 17:34

It is more tolerant than other STM32 models, which just want a diode drop (lest current backflow around the protection)

The DS I looked at covered the VDDA >=2V

http://www.st.com/content/ccc/resource/technical/document/datasheet/c5/ed/2f/60/aa/79/42/0b/DM00108832.pdf/files/DM00108832.pdf/jcr:content/translations/en.DM00108832.pdf

 

Not sure it is the issue here, but kind of the place I'd look for odd current flows.

Is the battery powering this?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
gwillette
Associate II
Posted on January 12, 2017 at 17:57

I removed the battery BT1 and lifted pin 21 so it is no longer connected to +1.25REF. The issue persists identically as before... And still no word back from anyone at ST help center.