Problem with powering STM32L432KC Nucleo from external source - Page 1
Forum section: electronics / general

author: XaviPacheco
author_rank: Regular Contributor
timestamp: August 16, 2018, 04:44:34 pm
content: If I power it through the USB cable, everything works fine, but if I power it through the 5V pin, with a 5V supply, the behavior of the controller is not normal. Someone suggested me (and what I see around the web) to update the ST Link firmware, so I did, and still the same. Have anyone had this kind of issue?

author: newbrain
author_rank: Super Contributor
timestamp: August 16, 2018, 07:33:32 pm
content: Please, define "not normal"Updating the ST-Link FW is not bad advice, but is in this case completely irrelevant:the ST-Link is not powered if you are using CN4 pin 4 (+5V) to power the board, so its FW won't make any differenceEven if the manual does not state this, I would try to remove the SB9 solder bridge (IIRC a 0resistor is fitted), as the reset line might be pulled low by the inoperative ST-Link.Remember also that the FW running on the target must set up an available clock (MSI, one of the two HSI or hte LSI) and not rely on the MSO from ST-Link.

author: XaviPacheco
author_rank: Regular Contributor
timestamp: August 16, 2018, 07:42:46 pm
content: By "not normal" I mean the program doesn't run and some GPIO pins are set high when I haven't set them.I've connected the 5V pin to 5V pin of the USB connector through a wire. That way it works. I will try removing SB9 as you state.

author: newbrain
author_rank: Super Contributor
timestamp: August 16, 2018, 07:55:31 pm
content: Just checked on another Nucleo 32 (F042), the NRST pin is held a 1.27V when the board is fed by the +5V pin.The reset pin characteristics are:VIL(NRST)NRST input low level, Min: 0.3 * VDDIO= ~1VVIH(NRST)NRST input high level, Max: 0.7 * VDDIO= ~2.3VSo 1.27V will have a very good chance to keep the MCU on reset, and that's what seems to happen to my Nucleo, too: remove SB9 and it'll work.

author: XaviPacheco
author_rank: Regular Contributor
timestamp: August 16, 2018, 08:12:28 pm
content: But if I remove SB9, and then, let's say that I want to program the controller through USB, do I have to put SB9 again?

author: newbrain
author_rank: Super Contributor
timestamp: August 16, 2018, 08:36:33 pm
content: Good question.I intended to add this to my previous post, but then forgot.In practice, there are very few situations when you need to program the MCU under reset:the only practical one that comes to mind is when one uses the SWD pins as regular GPIOs (and that would be a bit silly, as on that Nucleo the SWD pins are not available on the connectors...).The ST-link debugger orders resets through the SWD pins, and does not use the NRST pin unless specifically told so.If the push come to shove, you still have the reset button

author: Psi
author_rank: Super Contributor
timestamp: August 16, 2018, 10:04:21 pm
content: Have you connected GND from your 5v source to the board as well?

author: XaviPacheco
author_rank: Regular Contributor
timestamp: August 16, 2018, 10:06:14 pm
content: I found this interesting post very similar to my problem:https://os.mbed.com/questions/68476/Nucleo-F303K8-fails-to-start-program-whe/Someone says that you can connect the 5V to the Vin pin despite the official limitation at 7V, and it works. Is that reliable?Another person said:.... I made the test on the board, and I confirm that unmounting SB9 allows the MCU to run when the board is supplied by an external 5V with no PC connected. The downside that you point is true, and even worse, since I didn't managed to program the board in this configuration (the loading of the .bin file fails systematically). I have to re-mount SB9 in order to program the board. In first approach it is not possible to have the board run standalone AND make it reprogrammable with the same jumper configuration. The only solution I see is to have a bootloader through another bus (serial, USB ...) and not use the ST-Link connectino.....

author: newbrain
author_rank: Super Contributor
timestamp: August 16, 2018, 10:43:35 pm
content: Quote from: XaviPacheco on August 16, 2018, 10:06:14 pmAnd would you rather believe random strangers on the internet, rather than me ?(yes, I'm just another one)Just for your sake I tombstoned SB9 on one of my Nucleo (F042), and proceeded to program it (using OpenOCD/gdb and also drag and drop).No problems, programming and debugging.In fact, when I use my blackmagic probe or ST-link, I never connect the reset...Yes, using Vin will work, too, but it's clearly making it work out of specs.

author: XaviPacheco
author_rank: Regular Contributor
timestamp: August 16, 2018, 11:46:39 pm
content: Quote from: newbrain on August 16, 2018, 10:43:35 pmOf course not. Someone who I can directly interact with is, for sure, someone to be trusted.I haven't tried disconnecting SB9, but I will do it soon.Just realized that getting used to this microcontroller requires hard work.

author: l__orenz
author_rank: Newbie
timestamp: May 29, 2020, 12:33:57 pm
content: Hello, I had the same issue i.e.when powering the stml432kc from the 5V pin only, the program would not start as the reset pin is lowst-link version: v2j36m26sb9: connectedMy solution:connect a 150Ohm resistor between RST and 3V3 (the outputs of the arduino nano header)that way, RST is pulled high as long as the ST-LINK chip is not powered on and the program starts.I tried it with 330Ohm and and 6.8k, but that did not work.If anybody sees any issues with that solution, I'd be happy to know about it 😃

author: newbrain
author_rank: Super Contributor
timestamp: May 29, 2020, 01:04:56 pm
content: Quote from: l__orenz on May 29, 2020, 12:33:57 pmI object to pumping possibly more than than 10mA (3.3-1.3)/150 into a non powered chip from an I/O pin.The maximum injected current, not to be exceeded according to the STM32F103 DS, is ±5mA and that with the right Vdd and Vss.