给出小部分代码,供参考:
// disable ADC1
ADC_Cmd(ADC1, DISABLE);
// Reset DAC IP - to get normal STOP mode current
RCC_APB1PeriphResetCmd(RCC_APB1Periph_DAC, ENABLE);
// Release reset signal of DAC IP
RCC_APB1PeriphResetCmd(RCC_APB1Periph_DAC, DISABLE);
// configure all pins to analog_in
GPIO_Config_ALL_AIN(0);
// Disable the SRAM and FLITF clock in Stop mode
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_SRAM | RCC_AHBPeriph_FLITF, DISABLE);
// Mode: STOP + Regulator in LowPower + Entry with WFI
PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);