cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring Ground current does not seem to match datasheet on STM32L476RG (Nucleo-L476RG)?

SWenn.1
Senior III

Hello...

I am using a Nucleo-L476RG dev board along with https://github.com/STMicroelectronics/STM32CubeL4 .  I have built the code for PWR_STOP1_RTC and am trying to measure ground current.  I have a 10 ohm resistor on the ground side of 3.2V battery.  I have removed JP6 and JP5 on the board.  I am using a USB PicoScope.  At the moment I have two issues:

1.  I load the FW onto the target but I don't understand why this FW does NOT seem to run if I don't keep the usb connected to the nucleo?  Why is this?  I would like to disconnect this as it is just a source of noise and I am getting no where near the approx.   4 uA - 20 uA the datasheet specifies.

2.  For some reason the ground current (when 1. above is connected) measures negative?  I can plug into a traditional scope and it is not negative.  I did calibrate probe and when connected to picoscope I did the autozero...Any thoughts here?  

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Evangelist III

@SWenn.1 wrote:

this FW does NOT seem to run if I don't keep the usb connected to the nucleo?  Why is this?

 


In addition to the unpowered ST-Link holding NRST low, as @Sarra.S mentioned, note that the MCU clock source on most* Nucleo boards defaults to the ST-Link - have you taken that into account?

https://community.st.com/t5/stm32-mcus-boards-and-hardware/nucleo-f103rb-run-on-startup/m-p/687751/highlight/true#M19679

 

On the NRST thing:

https://community.st.com/t5/stm32-mcus-boards-and-hardware/external-powering-of-nucleo-l031k6-hsi-able-to-run/m-p/663084/highlight/true#M18423

 

EDIT:

* It seems that the Nucleo-L476RG is an exception:

AndrewNeil_1-1725532626284.png

 

View solution in original post

7 REPLIES 7
Sarra.S
ST Employee

Hello @SWenn.1

Try probing the NRST pin, this could happen if the NRST line is being held low by the ST-Link when the USB is disconnected

2nd issue is probably related to probe calibration since it's not negative using an oscilloscope

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Andrew Neil
Evangelist III

@SWenn.1 wrote:

this FW does NOT seem to run if I don't keep the usb connected to the nucleo?  Why is this?

 


In addition to the unpowered ST-Link holding NRST low, as @Sarra.S mentioned, note that the MCU clock source on most* Nucleo boards defaults to the ST-Link - have you taken that into account?

https://community.st.com/t5/stm32-mcus-boards-and-hardware/nucleo-f103rb-run-on-startup/m-p/687751/highlight/true#M19679

 

On the NRST thing:

https://community.st.com/t5/stm32-mcus-boards-and-hardware/external-powering-of-nucleo-l031k6-hsi-able-to-run/m-p/663084/highlight/true#M18423

 

EDIT:

* It seems that the Nucleo-L476RG is an exception:

AndrewNeil_1-1725532626284.png

 

Andrew Neil
Evangelist III

@SWenn.1 wrote:

I have removed JP6  


JP6 is the Idd measuring link - when you remove that, you disconnect power from the Target MCU.

The idea is that you insert a current meter here to measure the Target MCU's current consumption:

AndrewNeil_0-1725532378762.png

 

 

@Sarra.S ...Thank you ...that worked with using a pullup to VDD.

Just a quick follow up for documentation purposes and others....

To get a good clean measurement on ground current using a scope and a ground resistor I had to:

connect a resistor between NRST and VDD as a pullup

I also had to remove the 0 ohm resistor labeled SB12 NRST.  This was critical as somehow the 3V3_ST_LINK net had 2.5V on it even without USB connection and JP6 not connected.  It was feeding back thru somewhere and causing the STLINK chip to have power.


@SWenn.1 wrote:

To get a good clean measurement on ground current using a scope and a ground resistor I had to:

connect a resistor between NRST and VDD as a pullup 


That's odd, given that it has an internal pull-up. 

BarryWhit_0-1725561422581.png

If something was indeed holding the NRST low, it would make more sense to stop that from happening, rather then add a pullup to fight it. Otherwise, it's like turning on a space-heater instead of turning off the A/C. I'm not sure adding a pullup is enough to skew your measurements, but it definitely won't help.

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.