AVR睡眠模式总结
[size=18px][/size]最近,做项目,在收尾阶段在功耗上面栽了一大跟头!
因此觉得有必要对xmega系列单片机的休眠模式总结一下。
xmega有5种休眠方式,按照休眠的深度排列如下:
idle<extended standby<power save<standby<power down.
本人项目所用芯片为xmega256a3bu,256KFlash/16KRam,加上丰富的外设!应该说
在8位单片机中算得上是功能超强的一款!
不过唯一的缺陷,使用内部TC时,其产生的中断不能唤醒其余的睡眠模式,除了Idle.
但是Ilde模式省电非常有限!在idle模式下,实测+外围电路整板电流为35mA左右!
采用RTC来中断则功耗能达到预期,但采样率又不能达到系统要求!
最后,只能更换主芯片,才能在功耗与性能方面都满足产品要求!
特别提醒,RTC中断需要注意下述内容(针对ATMEL xmega系列)
//-----------------------------------------------------------------------------------------------------------
* \section rtc32_min_alarm_time Minimum allowed alarm time
*
* Due to the RTC32 clock synchronization, there is a minimum alarm time that
* will generate a interrupt. This minimum time is 2 RTC32 clock cycles.
*
* Also, if a new RTC32 clock cycle is imminent at the time of setting the
* alarm, there is a risk that it will be missed even with the value 2. If there
* is a risk that this may occur, it is recommended to use a minimum alarm time
* of 3.
//-----------------------------------------------------------------------------------------------------------