KugleFirmware/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c
/**
  * @brief  Disable the Backup Regulator.
  * @retval HAL status
  */
@brief  Disable the Backup Regulator.
@retval HAL status
@brief Disable the Backup Regulator . @retval HAL status
HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void)
{
  uint32_t tickstart = 0;
  CLEAR_BIT(PWR->CR2, PWR_CR2_BREN);
  tickstart = HAL_GetTick();
  while(__HAL_PWR_GET_FLAG(PWR_FLAG_BRR) != RESET)
  {
    if((HAL_GetTick() - tickstart ) > PWR_FLAG_SETTING_DELAY_US)
    {
      return HAL_TIMEOUT;
    }
  }
  return HAL_OK;
}
HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg ( void ) { uint32_t tickstart = 0 ; CLEAR_BIT ( PWR -> CR2 , PWR_CR2_BREN ) ; tickstart = HAL_GetTick ( ) ; while ( __HAL_PWR_GET_FLAG ( PWR_FLAG_BRR ) != RESET ) { if ( ( HAL_GetTick ( ) - tickstart ) > PWR_FLAG_SETTING_DELAY_US ) { return HAL_TIMEOUT ; } } return HAL_OK ; }
@brief  Disable the Backup Regulator.
@brief Disable the Backup Regulator .
/* Disable the Backup regulator */ /* Get tick */ /* Wait till Backup regulator ready flag is reset */