Skip to main content
Visitor II
September 2, 2024
Solved

STM32L0 LOW POWER MODE

  • September 2, 2024
  • 1 reply
  • 706 views

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

    This topic has been closed for replies.
    Best answer by Sarra.S

    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;

     

    1 reply

    Sarra.SAnswer
    ST Employee
    September 5, 2024

    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;