2025-04-24 9:31 PM
Hi there, I am currently working on power optimization for my application. My code runs at 80MHz HSI, so in order to implement sleep mode I am dynamically changing the clock to 2MHz. After system changes to 2MHz, I am disabling the systick using the function "HAL_SuspendTick()", and i am using the function "HAL_PWRex_EnterSTOP2Mode(PWR_STOPENTRY_WFI)". Outside the main I am using the EXTI callback associated with pin pc13 i.e. exti13, to wake system from stop-2 mode. The issue I am facing is in stop-2 mode ideally it has to consume 1.1uA- 1.4uA, but for me using the above approach my current consumption is 200uA which is very high. Kindly help me out sorting this issue.