cancel
Showing results for 
Search instead for 
Did you mean: 

software power off

yang hong
Associate II

Hello,

I am using NUCLEO-F429ZI. Can I use software to power off controller?

Regards,

3 REPLIES 3

You can put the chip in STANDBY

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello, Clive:

thank you for your response.

I try to add the following code to enter standby mode

 //disable wake-up timer

 HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);

 //diable RTC Alarm

 HAL_RTC_DeactivateAlarm(&hrtc,RTC_FLAG_ALRAF);

 //clear PWR FLAG

 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);

 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);

 //enable WKUP pin

 HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);

 //enter standby mode

 HAL_PWR_EnterSTANDBYMode();

 //

 //turn off led 2

 GPIOB->BSRR = (uint32_t)LD2_Pin << 16U;

but I still have 1mA current when I put battery in my system. Do you have any idea to reduce current when only battery is connected to controller?

thank you in advance.

Piranha
Chief II
DBGMCU->CR = 0; // Disable debug and trace in low-power modes

Do this before entering low-power mode.