2024-09-02 12:45 AM
Hi Everyone,
I use STM32L083 MCU. My code has two sections which are bootloader code and main code.
Bootloader Code Start Address : 0x0800000
Main Code Start Address : 0x08006400
I implemented low power mode in my main code and used "HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); " functions. If my main code start adress is 0x08006400, enter stop mode functions is not working and current consumption is around 1-2 mA. However, If I dont use bootloader and arrange main code start adress as 0x0800000, enter stop mode functions is working and current consumption is around 1-10 uA .
Can you provide a solution to make the first case work?
Best Regards,
Nuri
2024-09-05 02:43 AM
Hello @Nbaşa.1,
Make sure that the vector table offset is correctly relocated to the start address of the main application 0x08006400
#define MAIN_APP_START_ADDRESS 0x08006400
SCB->VTOR = MAIN_APP_START_ADDRESS;
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.