STM32 Arduino vs Cube - power consumption

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
marcom@marcom.net.pl
Posts: 1
Joined: Wed Mar 22, 2023 11:20 pm

STM32 Arduino vs Cube - power consumption

Post 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
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: STM32 Arduino vs Cube - power consumption

Post by GonzoG »

User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32 Arduino vs Cube - power consumption

Post 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.
Post Reply

Return to “General discussion”