Skip to main content
Jay_Bolboli
Associate II
April 15, 2024
Solved

Using X-Nucleo-LPM01A for measuring power consumption of NUCLEO-L432KC

  • April 15, 2024
  • 15 replies
  • 4184 views

Hello Everyone, 

For a project, I'm using a NUCLEO-L432KC board and it is connected to external sensors, Tx, and Rx (which work with 4-5 V). I want to use an X-Nucleo-LPM01A to measure its power consumption. 
Based on the NUCLEO-L432KC documents, I have to open SB9 and SB14, then NUCLEO-L432KC can be powered on by X-Nucleo-LPM01A then we can measure the board power consumption.


But there is a problem.  if I use this method I can't use ST-LINK and USB to program the NUCLEO-L432KC board and I can't change some parts of the code. Each time, I have to solder them again, program the board, and then open the solder bridges SB14 and SB9.

Now the question is, is there any alternative solution?

I really appreciate your help

This topic has been closed for replies.
Best answer by RomainR.

Hi @Jay_Bolboli 

 

Can you refer to UM2243 Rev 2 in chapter 8.2 Settings for use of the Arduino Nano connectors in a
Nucleo32 use case.

You do not have to unsolder/solder SB14 and SB9. Let these solder bridge shorted as default.
Nucleo32 board is powered trough AREF (which is same than VDD)

- Simply remove JP1 on Nucleo32 to prevent reverse voltage from X-Nucleo-LPM01A to U3 LD39050.
- Insert Nucleo-L432KC on header CN12/CN13 on  X-Nucleo-LPM01A.
- Connect COM port with STM32CubeMonitorPower, Take Control then check Input Voltage(mV) = 3300mV
- Connect Nucleo-L432KC STLink to your computer.
- Set Acquisition Time(s) = Infinite and then Start Acquisition with STM32CubeMonitorPower.
Now you can program/debug your firmware and monitor the power consumption. 

Let me know if it helps?

Best regards,

Romain,

15 replies

RomainR.
RomainR.Best answer
ST Employee
April 15, 2024

Hi @Jay_Bolboli 

 

Can you refer to UM2243 Rev 2 in chapter 8.2 Settings for use of the Arduino Nano connectors in a
Nucleo32 use case.

You do not have to unsolder/solder SB14 and SB9. Let these solder bridge shorted as default.
Nucleo32 board is powered trough AREF (which is same than VDD)

- Simply remove JP1 on Nucleo32 to prevent reverse voltage from X-Nucleo-LPM01A to U3 LD39050.
- Insert Nucleo-L432KC on header CN12/CN13 on  X-Nucleo-LPM01A.
- Connect COM port with STM32CubeMonitorPower, Take Control then check Input Voltage(mV) = 3300mV
- Connect Nucleo-L432KC STLink to your computer.
- Set Acquisition Time(s) = Infinite and then Start Acquisition with STM32CubeMonitorPower.
Now you can program/debug your firmware and monitor the power consumption. 

Let me know if it helps?

Best regards,

Romain,

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.
Jay_Bolboli
Associate II
April 15, 2024

Hi @RomainR.  

Thank you for your prompt response and help.

You're correct, I followed your instructions and it worked. However, I have encountered an issue with my sensors, Tx, and RX, which are connected to peripherals like SPI and UART—they have stopped working.

I suspect this might be because the method I used is for measuring the power consumption of the MCU alone, given that JP1 is open.

Could you please provide some advice on how to resolve this issue?



RomainR.
ST Employee
April 15, 2024

I don't know exactly your application, what is the power source for your sensors? Is it present all the time, what do you measure?
Please give more details otherwise I wouldn't be able to help you!

Best regards,

Romain

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.
Jay_Bolboli
Associate II
April 15, 2024

 

Dear @RomainR. 

Simply I can say that the application continuously measures CO2 and tVOC every second using a sensor connected to the board via I2C1. This sensor is powered by the 3.3V pin.

The gathered sensor data is then transmitted using two different communication methods:

  1. It is transmitted through the LoRa module, which is connected to SPI1 and powered using the 3.3V pin.
  2. It is also transmitted through an optical Tx module connected to UART1 Tx, powered by the 5V pin.

    Thanks for your help and support
Andrew Neil
Super User
April 15, 2024

@Jay_Bolboli wrote:

Each time, I have to solder them again, program the board, and then open the solder bridges SB14 and SB9.


No, you don't have to keep soldering & unsoldering them!

Just unsolder them, and then use jumper wires to make the connections when you need them.

Be sure to check carefully with the schematic - don't trust just the Manual - that there are no other connections to the ST-Link or other stuff. Otherwise these will contribute leakage to your measurements...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Jay_Bolboli
Associate II
April 16, 2024

Dear @RomainR. @Andrew Neil 

Thank you for your help and time. 

I understand your points. What I gather from what you're saying is that even when JP1 is open, it will not affect other peripherals. However, I believe it does affect them.

In  UM1956 Rev 5, section 6.7, Hardware layout and configuration, it is mentioned that: 

----------------------

JP1 on: STM32 is powered (default)
JP1 off: an ammeter must be connected to measure the STM32 current
If there is no ammeter, STM32 is not powered.
----------------------
So I think this is because VDD is out . And I think the VDD is the main supply voltage that powers the core and peripherals.

I also connected a logic analyzer to check their signals, and I found that their signals (UART, SPI, and I2C) are available only if JP1 is connected.

FYI:
this is pinout, I took it from CUBEMX that shows how everything is connected. Furthermore, SB14 is closed, while SB16 and SB18 are open for I2C use.

 

Thanks again for your help, 
Kind regards

 



Andrew Neil
Super User
April 16, 2024

@Jay_Bolboli wrote:

 What I gather from what you're saying is that even when JP1 is open, it will not affect other peripherals. However, I believe it does affect them.


There may be some confusion on what you mean by "peripherals" here?

As you can see from the schematics, VDD is indeed the power supply to the STM32 Target chip;  that will include power to all the STM32's internal peripherals - UART, SPI, I2C, etc.

But power to external peripherals - such as your LoRa and Optical Tx - will depend on how, exactly, you are powering those devices.

Again, you really need to provide a schematic of your system - showing how you have all these things connected.

Words/text are a particularly poor way to describe electrical connections - especially with language differences. This is why we use schematic diagrams!

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Jay_Bolboli
Associate II
April 16, 2024

Thanks Andrew. 

I have provided a photo below that shows all the connections.

Reds are the power lines and blues are the signal lines. 
Also, I have to mention that I tested the system. when JP1 was not connected signal lines did not work (I checked with a logic analyzer) but power was available. And when JP1 was connected everything worked fine. 

 

 

Clock Configuration (I used MSI):

Jay_Bolboli_1-1713257080706.png

 


Kind regards,

Jay_Bolboli
Associate II
April 16, 2024

Yes, your diagram is correct. 

  • LoRa, Sensor, and Optical TX are connected to +3v3 and +5V pins
  • STM32 also is supplied from X-Nucleo-LPM01A using AREF pin

All three power sources are available for the system (I have checked the pins using a multimeter). 
however, I am not sure if the AREF pin is internally connected to smt32 or not. Based on the diagram it is connected and there is no bridge and it is connected to AVDD directly.

Jay_Bolboli_0-1713261883046.png

 

 

What do you mean by "power was available" there?

Here I meant that electrical power was flowing through the system (I have checked using a multimeter)

Thanks for your time and help

Andrew Neil
Super User
April 16, 2024

@Jay_Bolboli wrote:
  • STM32 also is supplied from X-Nucleo-LPM01A using AREF pin

Why not apply it at the VDD side of JP1 ?

AndrewNeil_0-1713262824239.png

Note that you'd also need to link the X-Nucleo GND to the L432KC GND

 


@Jay_Bolboli wrote:

I am not sure if the AREF pin is internally connected to smt32 or not. Based on the diagram it is connected and there is no bridge and it is connected to AVDD directly.


Yes, it is connected via SB10 and the L1 ferrite bead - which is there to filter digital noise from the analogue supply.

You are effectively feeding the power from the "wrong" side of the filter.

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Jay_Bolboli
Associate II
April 17, 2024

Hello @Andrew Neil @RomainR.  

I want to thank you both for your help and support. 

It appeared that the problem was the AREF. It was provided by the X-Nucleo-LPM01A, and I was able to measure it on the pin.

However, I discovered that internally, the AREF wasn't connected to MCU. I suspect this might be due to the ADC. In my application, I'm using the ADC, so it's likely that the AREF was being utilized as the reference voltage for the ADC. When I tested it without the ADC, the problem was solved.


Kind regards,