cancel
Showing results for 
Search instead for 
Did you mean: 

SMT32L4 power consumption to high

bareil76
Associate II

Hi all,

I have a project with a SMT32L431. Right now it is running on the nucleo-64 demo board (its a STM32L4 33RCT6P) so nothing is connected to the board.

The project will use all UART and LPUART modules, the SPI1, the I2C2 and the CAN1 module. I have setup the clock at 2MHz using the MSI clock. When starting the module and configuring the clock, deactivating the TIM1 and setting in low power run mode, the consumption drops to 140uA. This is my starting point.

  1. Setting the GPIO, I get 170uA. However, if the PC11 is set as an input I get to 300uA!! There is another pin that I had to set as an output to get low consumption. Why? Floating pin problem?
  2. Setting the DMA1, I get 175uA
  3. Setting the CAN module, I get 315uA. According to the documentation CAN should consume only 8uA why?
  4. LPUART1 sky rockets this to 525uA while datasheet says 7uA
  5. UART1 gets me to 700uA
  6. UART2 gets me to 720uA (only +20uA while the uart1 is 175uA)!!!
  7. UART3 gets me to 740uA
  8. SPI 880uA
  9. I2C 970uA
  10. LPTIM1 with 1s interrupts 980uA

For now I only have LPTIM1 doing interrupts every 1s and a main loop that does nothing but check flags of the LPTIM1 interrupts and sends the device into low power sleep mode.

 

Clock config is very simple. I have setup MSI to 2MHz, distributed that to SYCCLK. Then PCLK1 and 2 runs at 2MHz. All modules use PLCk1 or 2 and ADC uses SYSCLK (so that PLL is not used)

 

2 REPLIES 2

> Setting the GPIO, I get 170uA. However, if the PC11 is set as an input I get to 300uA!!

Let's just start here. What do you exactly mean by "setting the GPIO"? Read out and check/post content of GPIO and all other registers you have changed from default.

> deactivating the TIM1

Why would you need that? Does this mean that there is something else before the experiment? That's then a rather uncertain object to start with. Why don't you start from a clean slate, i.e. the reset states?

JW

bareil76
Associate II

I set all inputs to GND and now I get 270uA before SPI init. Much better. However, after SPI, I have 413uA and after I2C I have 500uA. So I2C takes 70uA which seems like a lot and SPI takes 143uA which is too much for sure.

 

For SPI, I set the MISO pin to GND

For I2C, I set SCL to 3.3V pull up, but when setting SDA to 3.3V pull up (4.7kOhm) the MCU resets)