123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef SN_STOP_H
- #define SN_STOP_H
- #include "ciu32f003_std.h"
- #include "SN_GPIO.h"
- #include "SN_ADC.h"
- #include "SN_PWM.h"
- #include "SN_EXIT.h"
- #include "SN_TIM3_INIT.h"
- #include "SN_TIM1_INIT.h"
- #include "SN_UART.h"
- #include "SN_FLASH.h"
- #include "SN_RCC.h"
- #include "SN_SPI.h"
- #include "SN_DDQ.h"
- #include "i2c_bsp.h"
- #include <stdio.h>
- void SN_STOP_EN(void); //进入休眠
- void SN_LPtim_Rouse(uint16_t cnt); //使用定时器唤醒
- void SN_Exti_Rouse(void); //使用io唤醒
- void SN_LPtim_ARR(uint16_t cnt); //更新定时间
- void SN_LPtim_SN_LPtim_Stop(void); //停止lptim唤醒
- void SN_LPtim_SN_LPtim_EN(void); //启动lptim唤醒
- //休眠系统设置参数---------------------------------------------------------------------------------------
- #define LPtim_Div //唤醒的时钟
- #define LPtim_Div_colk_Source //时钟源, 推荐使用RCL
- #define LPTIM_PRESCALER_DIV_x LPTIM_PRESCALER_DIV1
- #define PMU_MODE PMU_MODE_STOP //PMU_MODE_STOP普通休眠 PMU_MODE_DEEPSTOP深度休眠
- // 休眠时间计算公式: (32k/LPTIM_PRESCALER_DIV_x )*CNT = 休眠时间
- //-------------------------------------------------------------------------------------------------------
- #endif
|