打印
[STM32F1]

STM32F101RC最小系统停止模式功耗0.6ma

[复制链接]
1961|9
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
heishadow|  楼主 | 2014-6-9 11:15 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
我的系统目前只焊接了8M和32768hZ晶振电路和复位电路,采用3.6V电池供电,测试ST官方例程的WakeUpTiming例程进入停止模式电流为0.6ma,MCU为STM32F101RC   ,代码非常简单:请各位高手帮忙!谢谢!!!!
​int main(void)
{
  /* Clock configuration */
  SystemInit();
  /* Enable PWR and BKP clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);
​  /* Desable the SRAM and FLITF clock in Stop mode */
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_SRAM|RCC_AHBPeriph_FLITF, DISABLE);
GPIO_Config_ALL_AIN();
​ PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);​
}

void GPIO_Config_ALL_AIN(void)
{
  GPIO_InitTypeDef GPIO_InitStructure;

  /* Disable the Serial Wire Jtag Debug Port SWJ-DP */
  GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
  
    /* PA  */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOA, &GPIO_InitStructure);
      /* PB  */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOB, &GPIO_InitStructure);
      /* PC  */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOC, &GPIO_InitStructure);
        /* PD  */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOD, &GPIO_InitStructure);
  
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOE, &GPIO_InitStructure);

​  /* Enable GPIOD and GPIOE clock */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB
                         | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD
                         |  RCC_APB2Periph_AFIO, DISABLE);​
}
​​​
​​​
沙发
heishadow|  楼主 | 2014-6-9 13:32 | 显示全部楼层
外设除了RCC、PWR、BKP外都没开,进入STOP模式HSE/PLL不都是自动关闭了吗?我现在也没让它唤醒,即使我关闭PWR、BKP外设也没多大变化。RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, DISABLE);
我将电流表与电池串联测量系统功耗。因为我的系统现在只有最小系统,与直接给VBAT引脚供电基本一样。另外standby模式我测量大概是25ua左右

使用特权

评论回复
板凳
heishadow|  楼主 | 2014-6-12 09:39 | 显示全部楼层
已解决!程序没有问题,换了一片MCU就OK了,现在还不清楚这片MCU是不是个体差异。实测STOPMode电流24uA,standby模式2.2uA,如果standby模式唤醒后也能从下一条指令执行就更加完美了!再次谢谢各位的回复!

使用特权

评论回复
地板
heishadow|  楼主 | 2014-6-13 14:36 | 显示全部楼层
谢谢楼上的建议!忽略这个条件了,用ATMEL的习惯了,呵呵!分就给您了!

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

13

帖子

0

粉丝