[STM32L452RE] Can a 8 MHz HSE crystal cause 5 mA current usage increase in shutdown mode?

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
brixton
Posts: 24
Joined: Thu Mar 30, 2023 11:51 am
Answers: 1

[STM32L452RE] Can a 8 MHz HSE crystal cause 5 mA current usage increase in shutdown mode?

Post by brixton »

Hello everyone,

I have two devices, both using the same STM32L452RE chip as the main (and only) MCU. It's the Nucleo 64 L452RE board, and a custom PCB.

When I put both into sleep modes (using STM32LowPower library), the custom PCB consistently draws more power .
In "deepSleep" the Nucleo uses about 2.8 μA, for the custom PCB it is about 200 μA.
When I then put the devices into "shutdown" mode, the Nucleo goes down to 0.5 μA whereas the custom PCB consumes a whopping 5 mA (!!).

The custom PCB contains a bunch of extra components such as ADXL etc, but through carefully setting each component to sleep I've concluded that the high current consumption must be coming from the MCU and not the other components.

The only difference I can really see between the Nucleo and the custom PCB is that the custom PCB has an 8 MHz crystal attached to the PH0 and PH1 pins (where X3 on the Nucleo board would be), whereas the Nucleo has nothing attached to those pins.
N.B. I have not made any changes in software to accomodate for this added crystal.

So my question is:
1. Could this added crystal account for the increased current usage?
2. If yes, should I be making changes in the Arduino code to accomodate for the crystal on PH0 and PH1? I came across this thread. Would it be wise to follow the rough procedure in there? viewtopic.php?p=11540&hilit=configure+oscillator#p11540
3. If yes, In the event that I don't want to use the crystal, but also don't want to physically remove it, is there a way to disable it in software? So that I'm not faced with the high power consumption. I already tried doing the following but that didn't do anything to the power consumption.

Code: Select all

  
  pinMode(PH1, OUTPUT);
  digitalWrite(PH1, LOW); 
  pinMode(PH0, OUTPUT);
  digitalWrite(PH0, LOW); 
  

Many thanks
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: [STM32L452RE] Can a 8 MHz HSE crystal cause 5 mA current usage increase in shutdown mode?

Post by fpiSTM »

In shutdown mode the HSE is switched off as stated in the datasheet:

Code: Select all

Shutdown mode
The Shutdown mode permits to achieve the lowest power consumption. The internal
regulator is switched off so that the VCORE domain is powered off. The PLL, the HSI16,
the MSI, the LSI and the HSE oscillators are also switched off.
So not is is not the HSE which give you such issue. I don't know where they can comes. Probably hardware design issue tor something like that.
Post Reply

Return to “General discussion”