cancel
Showing results for 
Search instead for 
Did you mean: 

High current consumption in stop mode when activating SPI2 and decreasing current when deinitializing MOSI pin

ONama.1
Associate

Hello ST community,

I'm encountering an issue with my STM32 MCU where I observe higher than expected current consumption in stop mode when the SPI2 port is activated, and interestingly, the current consumption decreases when I deinitialize the MOSI pin. I'm seeking some insights and suggestions to help troubleshoot and resolve this problem.

Here are the details of my setup:

  • The PCB has only the STM32L072RZI MCU assembled.
  • During stop mode, the MCU typically draws around 8 microamps.
  • However, when I activate the SPI2 port, the current consumption increases to approximately 100 microamps.
  • Strangely, when I deinitialize the MOSI pin, the current consumption decreases to around 8 microamps.

I have reviewed the datasheet and reference manual of my MCU, but I couldn't find a clear explanation for this behavior. I have also ensured that I properly enable and disable the SPI2 port and MOSI pin in my code.

I'm reaching out to the community to inquire if anyone has encountered a similar issue or has any insights into possible causes or troubleshooting steps to investigate this problem further. Could it be related to the peripherals associated with the SPI2 port or some other factor that affects current consumption in stop mode?

Additionally, I'd appreciate any advice on how to measure and analyze current consumption accurately during different stages of the MCU's operation, as well as any recommendations on best practices for managing current consumption in stop mode.

Thank you for your expertise and assistance in advance!

Best regards,

Oğulcan Namaz

1 REPLY 1
Mohamed Aymen HZAMI
ST Employee

Hello @Oğulcan Namaz​ and welcome to the community,

Before entering Stop mode you need to put all the used GPIOs in analog mode, try this configuration and see if you have the same behavior or not?

Mohamed Aymen