Page 1 of 1

STM32 Arduino vs Cube - power consumption

Posted: Wed Mar 22, 2023 11:46 pm
by marcom@marcom.net.pl
Hi.
I have a small project with SIM800L+GPS+some stuff and my first code was made in Arduino.
If SIM800 and GPS are powered off the current consumption is about 25mA !
Sim800 is powered from Vbatt pin, directly form LiPo.
There is a TLV73333PDBVT 3.3V regulator for the rest.
When I use CUBE IDE and make only a few lines of code (SIM800L+GPS power off by PWR and EN PIN) the power consumption is about 12mA !
I think the reason is that Arduino turn on all of peripherals in contrast to Cube.
It is only my theory but I have no better explanation.
I turned on/off pullup but without success.
How can I turn off some peripherals of STM32F103CBt6 ?
Maybe I am wrong and the reason is quite different ?
I'm losing hope.

Thank You for Your help,
Mariusz

Re: STM32 Arduino vs Cube - power consumption

Posted: Thu Mar 23, 2023 3:15 pm
by GonzoG

Re: STM32 Arduino vs Cube - power consumption

Posted: Sat Mar 25, 2023 6:40 am
by fpiSTM
Not all peripherals are turned on but probably some of them.
You can call HAL to disable them. Arduino have to be generic that's why some of them are enabled.