[STM32G030K6T] / low power sleep / power consumption / 116uA instead of 13uA
Hi!
When i run this code in SRAM via the UART bootloader "go command":
asm("cpsid i\n");
// turn off prefetch and set FLASH.latency to 0
cFicen(); cFprften(); uFlatency(0); while (gFlatency()!=0);
// config GPIO (seems to have no effect on power consumption)
((u32*)GPIO[A])[MODER]=-1U;
((u32*)GPIO[A])[OSPEEDR]=0;
((u32*)GPIO[A])[PUPDR]=0;
((u32*)GPIO[C])[MODER]=-1U;
((u32*)GPIO[D])[MODER]=-1U;
((u32*)RCC)[IOPENR]=0;
// switch sysclk to LSI and turn off HSI (initial letter:s=set,c=clr,g=get,u=update)
sClsion(); while (!gClsirdy()); uCsw(LSI); while (gCsws()!=LSI); cChsion();
// go to low power run mode
sPlpr();
// go to low power sleep mode
while (!gPreglpf()); cSCRsleepdeep(); asm("wfi\n");
I get a current of 136uA, where the external parts (PCA9306, SP0504, 2 LDOs, NCP431 voltage clamp) use 20uA...
Even in "run mode"/range2/SRAM/8MHz it used 728uA, instead of the typical 600uA+20uA.
Can someone here say, how i can save those 100uA?
Should I try another board without all those extra parts? Just the STM32G030K6T and a cap of course...?
Thx.
Bye.
