使用CC1310,其中使用了 Sensor Controller里的ADC,为了得到更低的休眠功耗,也需要在进入休眠前把Sensor controller 里的相关功能关闭,但醒来后,会出现再次初始化sensor controller设备不成功,导致异常。是我的程序哪里不对么,还是有其他方法?
void Sci_open(void) { PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH | PRCM_DOMAIN_SERIAL); while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH | PRCM_DOMAIN_SERIAL)!= PRCM_DOMAIN_POWER_ON); ///* GPIO power */ PRCMPeripheralRunEnable(PRCM_PERIPH_GPIO); PRCMLoadSet(); while (!PRCMLoadGet()); } ///休眠关闭不使能SCI void Scif_close(void) { PRCMPeripheralRunDisable(PRCM_PERIPH_GPIO); PRCMLoadSet(); //while (!PRCMLoadGet()); PRCMPowerDomainOff(PRCM_DOMAIN_SERIAL | PRCM_DOMAIN_PERIPH); //while (PRCMPowerDomainStatus(PRCM_DOMAIN_SERIAL | PRCM_DOMAIN_PERIPH)!= PRCM_DOMAIN_POWER_OFF); }