Skip to main content
yang hong
Associate III
September 23, 2019
Question

software power off

  • September 23, 2019
  • 2 replies
  • 781 views

Hello,

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

Regards,

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
September 23, 2019

You can put the chip in STANDBY

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
yang hong
yang hongAuthor
Associate III
September 24, 2019

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
Principal III
September 25, 2019
DBGMCU->CR = 0; // Disable debug and trace in low-power modes

Do this before entering low-power mode.