N32L403低功耗测试,只焊接芯片最小单元,VDD处3.3V供电standby模式下电流最低9uA,这个数值是不是正常的,如何进一步降低待机电流,待机操作步骤如下
log_info("\r\n MCU Goto Standby!\r\n");
//LED_ON;
LORA_PWR_OFF;
TIM_Enable(TIM1, DISABLE);
TIM_Enable(TIM6, DISABLE);
ADC_Enable(ADC, DISABLE);
DMA_EnableChannel(DMA_CH1, DISABLE);
USART_Enable(USART1, DISABLE);//log
USART_Enable(USART2, DISABLE);
GPIO_InitType GPIO_InitStructure;
GPIO_InitStruct(&GPIO_InitStructure);
GPIO_InitStructure.Pin = GPIO_PIN_15;
GPIO_InitStructure.GPIO_Pull = GPIO_No_Pull;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Input;
GPIO_InitPeripheral(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.Pin = GPIO_PIN_7;
GPIO_InitPeripheral(GPIOB, &GPIO_InitStructure);
//372uA
// GPIOA->PMODE = 0x00000000;GPIOA->PUPD = 0x00000000;
// GPIOB->PMODE = 0x00000000;GPIOB->PUPD = 0x00000000;
// GPIOC->PMODE = 0x00000000;GPIOC->PUPD = 0x00000000;
// GPIOD->PMODE = 0x00000000;GPIOD->PUPD = 0x00000000;
RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_GPIOA | RCC_APB2_PERIPH_GPIOB | \
RCC_APB2_PERIPH_GPIOC | RCC_APB2_PERIPH_GPIOD | \
RCC_APB2_PERIPH_TIM1 | RCC_APB2_PERIPH_AFIO | \
RCC_APB2_PERIPH_USART1, DISABLE);
RCC_EnableAHBPeriphClk(RCC_AHB_PERIPH_ADC | RCC_AHB_PERIPH_DMA, DISABLE);
RCC_EnableAPB1PeriphClk(RCC_APB1_PERIPH_TIM6 | RCC_APB1_PERIPH_USART2, DISABLE);
if(RESET == RCC_GetFlagStatus(RCC_CTRLSTS_FLAG_MSIRD))
{
RCC_ConfigMsi(RCC_MSI_ENABLE, RCC_MSI_RANGE_100K);
while(SUCCESS != RCC_WaitMsiStable());
}
RCC_EnableHsi(DISABLE);
RCC_EnableMsi(DISABLE);
RCC_EnablePll(DISABLE);
Wakeup_Pin_Config();
/* Enable PWR and BKP clock */
RCC_EnableAPB1PeriphClk(RCC_APB1_PERIPH_PWR, ENABLE);
/* Enable WKUP pin */
PWR_WakeUpPinEnable(WAKEUP_PIN1,ENABLE);
//DBG_ConfigPeriph(DBG_STDBY,ENABLE);
/* Check if the Wake-Up flag is set */
if (PWR_GetFlagStatus(1,PWR_STBY_FLAG) != RESET)
{
/* Clear Wake Up flag */
PWR_ClearFlag(PWR_STBY_FLAG);
}
/* Check if the Wake-Up flag is set */
if (PWR_GetFlagStatus(1,PWR_WKUP1_FLAG) != RESET)
{
/* Clear Wake Up flag */
PWR_ClearFlag(PWR_WKUP1_FLAG);
}
//507uA
/* Request to enter STANDBY mode */
PWR_EnterSTANDBYMode(PWR_STOPENTRY_WFI,PWR_CTRL3_RAM2RET);
//空片最低8.1uA,平均9uA
还有寄存器方式设定所有IO为输入电流反而加大了
|