1.关闭使能和关闭时钟
#define ADC_CLOSE()
{
ADC_CTL &= _BIT(1);
ADC_CLOSE_CLOCK();
}
2.设置为power down mode模式
BK2461使用ADC后,进入睡眠前如何关掉ADC,功耗才不高的问题
ADC_CTL 寄存器的描述。
#define ADC_SETUP(pres,sr,mode,chn,_12bits)
{
ADC_CTL=(((mode&3)<<6)|((chn&7)<<3));
ADC_DATAH= ((1<<7)|((pres&0x7)<<4));
ADC_RATE =(sr&0xff);
ADC_CTL2 = (((sr>>8)&0x0f)|(_12bits<<7)|(3<<5));
}
例如:
ADC_SETUP(0,0,0,0,0);

相关文章:

  • 2021-12-25
  • 2021-09-23
  • 2021-05-13
  • 2021-07-13
  • 2021-05-16
  • 2021-11-06
  • 2022-12-23
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2022-02-07
  • 2021-09-07
  • 2021-12-06
  • 2022-12-23
相关资源
相似解决方案