stm32duino / STM32LowPower

Arduino Low Power library for STM32
183 stars 52 forks source link

It's something wrong when I use shutdown mode with STM32G030C8T6 #105

Closed sunnyguhz closed 9 months ago

sunnyguhz commented 9 months ago

I take a lowpower test with STM32G030C8T6, idle/sleep/deepsleep is all right. It consumes 7uA of electric current when I use deepsleep mode. But It consumes 1520-2200uA of electric current when I use shutdown mode, I think smomething wrong with it.

Desktop (please complete the following information):

include "STM32LowPower.h"

void setup() {
  LowPower.begin();
}

void loop() {
  //LowPower.idle(10000);
  //LowPower.sleep(10000);
  //LowPower.deepSleep(10000);
  LowPower.shutdown(10000);
}
fpistm commented 9 months ago

Could you try without LTO.

sunnyguhz commented 9 months ago

Could you try without LTO.

I'm sorry,the previous current data was incorrect because I had previously modified the operating frequency. I reinstalled the development board. I try it again with LTO, It's consumes 3433uA of electric curren in shutdown mode. And It consumes 3268uA of electric curren without LTO in shutdown mode, more than deepsleep mode.

So, it is obvious that there is a problem with STM32G030C8T6 in shutdown mode.

fpistm commented 9 months ago

Hi @sunnyguhz I've tested and shutdown works. Some point to pay attention:

I've made a PR to enhance this mode but there is no issue.