Author Topic: Problem with powering STM32L432KC Nucleo from external source  (Read 4179 times)

0 Members and 1 Guest are viewing this topic.

Offline XaviPachecoTopic starter

  • Regular Contributor
  • *
  • Posts: 243
  • Country: do
Problem with powering STM32L432KC Nucleo from external source
« on: August 16, 2018, 04:44:34 pm »
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?
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: se
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #1 on: August 16, 2018, 07:33:32 pm »
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 difference  :palm:

Even if the manual does not state this, I would try to remove the SB9 solder bridge (IIRC a 0 \$\Omega\$ resistor 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.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline XaviPachecoTopic starter

  • Regular Contributor
  • *
  • Posts: 243
  • Country: do
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #2 on: August 16, 2018, 07:42:46 pm »
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.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: se
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #3 on: August 16, 2018, 07:55:31 pm »
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 = ~1V
VIH(NRST) NRST input high level, Max: 0.7 * VDDIO = ~2.3V

So 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.
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: thm_w, XaviPacheco

Offline XaviPachecoTopic starter

  • Regular Contributor
  • *
  • Posts: 243
  • Country: do
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #4 on: August 16, 2018, 08:12:28 pm »
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?
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: se
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #5 on: August 16, 2018, 08:36:33 pm »
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  ^-^
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: XaviPacheco

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9923
  • Country: nz
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #6 on: August 16, 2018, 10:04:21 pm »
Have you connected GND from your 5v source to the board as well?
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline XaviPachecoTopic starter

  • Regular Contributor
  • *
  • Posts: 243
  • Country: do
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #7 on: August 16, 2018, 10:06:14 pm »
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.....
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: se
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #8 on: August 16, 2018, 10:43:35 pm »
Someone says[...]

Another person said[...]

And would you rather believe random strangers on the internet,  rather than me ?  :-DD (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.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline XaviPachecoTopic starter

  • Regular Contributor
  • *
  • Posts: 243
  • Country: do
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #9 on: August 16, 2018, 11:46:39 pm »

And would you rather believe random strangers on the internet,  rather than me ?  :-DD (yes, I'm just another one)


Of course not  ;D . 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.
 

Offline l__orenz

  • Newbie
  • Posts: 1
  • Country: de
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #10 on: May 29, 2020, 12:33:57 pm »
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 low

    st-link version: v2j36m26
    sb9: connected

My 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 😃
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: se
Re: Problem with powering STM32L432KC Nucleo from external source
« Reply #11 on: May 29, 2020, 01:04:56 pm »
If anybody sees any issues with that solution, I'd be happy to know about it 😃
I 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.


Nandemo wa shiranai wa yo, shitteru koto dake.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf