You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
803 B
22 lines
803 B
#ifndef asp_SI24R1_
|
|
#define asp_SI24R1_
|
|
|
|
进入时钟停振模式时不建议开LVD 和比较器。如果确实需要用,建议开启掉电唤醒定时器,掉电唤醒定时器只会增加约1.4uA的耗电,
|
|
|
|
这个耗电一般系统是可以接受的。让掉电唤醒定时器每5秒唤醒一次 MCU,唤醒后可用LVD、比较器、 ADC检测外部电池电压,
|
|
检测工作约耗时 1mS后再进入时钟停振/省电模式,这样增加的平均电流小于1uA,则整体功耗大约为2.8uA(0.4uA+1.4uA+1uA)。
|
|
|
|
|
|
|
|
|
|
mcu上电初始化后,进入掉电模式,
|
|
启动掉电定时器,每5秒启动一次查询各种状态
|
|
gsensor 设置为动作后输出中断,其io连接mcu有唤醒功能的管脚,
|
|
然后系统开始工作,工作完成后立即休息,然后再定时
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|