打印
[应用相关]

停机模式怎样进入

[复制链接]
596|17
手机看帖
扫描二维码
随时随地手机跟帖
楼主
//定义IO初始化结构体
GPIO_InitTypeDef GPIO_InitStructure;
   
//设置zigbee模块进入低功耗模式
inf_zigbee_sleep();
   
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
                       RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD ,ENABLE);
   
//管脚初始化  
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
//选择GPIO响应速度
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;   
//设置为输出           
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
//初始化                           
GPIO_Init(GPIOA, &GPIO_InitStructure);  
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_Init(GPIOC, &GPIO_InitStructure);
GPIO_Init(GPIOD, &GPIO_InitStructure);
   
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
                           RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD ,DISABLE);
   
ADC_Cmd(ADC1,DISABLE);
//进入低功耗模式
PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);

使用特权

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

本版积分规则