Hello,I am using APM32F103 and Sxx32F103,when I directly initiate the sleep command to sleep mode,the power consumption of SxxF is at ua level and APM32 is at ma,is there any way to solve this?
I figure it out,just configuring the unused IO to be analog input mode before entering sleep mode ,and the power consumption of APM32 is better than SxxF,my opration is as below.
void GPIO_Anolog(void)
{
GPIO_Config_T GPIO_configStruct;
RCM_EnableAPB2PeriphClock(RCM_APB2_PERIPH_GPIOA|RCM_APB2_PERIPH_GPIOB
|RCM_APB2_PERIPH_GPIOC|RCM_APB2_PERIPH_GPIOD|
RCM_APB2_PERIPH_GPIOE|RCM_APB2_PERIPH_GPIOF|
RCM_APB2_PERIPH_GPIOG);
GPIO_configStruct.mode = GPIO_MODE_ANALOG;
GPIO_configStruct.pin = GPIO_PIN_ALL&(~GPIO_PIN_1);
GPIO_Config(GPIOA, &GPIO_configStruct);
GPIO_configStruct.mode = GPIO_MODE_ANALOG;
GPIO_configStruct.pin = GPIO_PIN_ALL;
GPIO_Config(GPIOB, &GPIO_configStruct);
GPIO_configStruct.mode = GPIO_MODE_ANALOG;
GPIO_configStruct.pin = GPIO_PIN_ALL;
GPIO_Config(GPIOC, &GPIO_configStruct);
GPIO_configStruct.mode = GPIO_MODE_ANALOG;
GPIO_configStruct.pin = GPIO_PIN_ALL;
GPIO_Config(GPIOD, &GPIO_configStruct);
GPIO_configStruct.mode = GPIO_MODE_ANALOG;
GPIO_configStruct.pin = GPIO_PIN_ALL&(~GPIO_PIN_6);
GPIO_Config(GPIOE, &GPIO_configStruct);
GPIO_configStruct.mode = GPIO_MODE_ANALOG;
GPIO_configStruct.pin = GPIO_PIN_ALL;
GPIO_Config(GPIOF, &GPIO_configStruct);
GPIO_configStruct.mode = GPIO_MODE_ANALOG;
GPIO_configStruct.pin = GPIO_PIN_ALL;
GPIO_Config(GPIOG, &GPIO_configStruct);
}