Esempio n. 1
0
/**
  * @brief  Disable low power mode behavior when the MCU is in Debug mode.
  * @param Periph: specifies the low power mode.
  *   This parameter can be any combination of the following values:
  *     @arg DBGMCU_SLEEP: Keep debugger connection during SLEEP mode
  *     @arg DBGMCU_STOP: Keep debugger connection during STOP mode
  *     @arg DBGMCU_STANDBY: Keep debugger connection during STANDBY mode
  * @retval None
  */
void HAL_DBGMCU_DBG_DisableLowPowerConfig(uint32_t Periph)
{
  /* Check the parameters */
  assert_param(IS_DBGMCU_PERIPH(Periph));
  {
    DBGMCU->CR &= ~Periph;
  }
}
/**
 * @brief  Configures low power mode behavior when the MCU is in Debug mode.
 * @param  DBGMCU_Periph: specifies the low power mode.
 *   This parameter can be any combination of the following values:
 *     @arg DBGMCU_SLEEP: Keep debugger connection during SLEEP mode              
 *     @arg DBGMCU_STOP: Keep debugger connection during STOP mode               
 *     @arg DBGMCU_STANDBY: Keep debugger connection during STANDBY mode        
 * @param  NewState: new state of the specified low power mode in Debug mode.
 *   This parameter can be: ENABLE or DISABLE.
 * @retval None
 */
void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState) {
    /* Check the parameters */
    assert_param(IS_DBGMCU_PERIPH(DBGMCU_Periph));
    assert_param(IS_FUNCTIONAL_STATE(NewState));
    if (NewState != DISABLE) {
        DBGMCU->CR |= DBGMCU_Periph;
    } else {
        DBGMCU->CR &= ~DBGMCU_Periph;
    }
}