I am in accordance with the technical documents(swra486.pdf),so that
CC1310 into standby, I would like to wake up once every 20 seconds through the RTC, but did not succeed in waking up。
void Power_Standby_Mode(void)
{
SysCtrl_DCDC_VoltageConditionalControl();
/* 1. Freeze the IOs on the boundary between MCU and AON */
AONIOCFreezeEnable();
OSCInterfaceEnable();
/* 1. Switch HF, MF, and LF clocks to source from RCOSC_HF */
if (OSCClockSourceGet(OSC_SRC_CLK_HF) != OSC_RCOSC_HF){
/* 1.1. Source HF and MF from RCOSC_HF */
OSCClockSourceSet(OSC_SRC_CLK_HF | OSC_SRC_CLK_MF, OSC_RCOSC_HF);
while (!OSCHfSourceReady());
OSCHfSourceSwitch();
}
/* 1.2. Source LF from RCOSC_LF */
OSCClockSourceSet(OSC_SRC_CLK_LF, OSC_RCOSC_LF);
while (OSCClockSourceGet(OSC_SRC_CLK_LF) != OSC_RCOSC_LF);
/* 3. Allow AUX to power down */
AONWUCAuxWakeupEvent(AONWUC_AUX_ALLOW_SLEEP);
/* 4. Make sure writes take effect */
SysCtrlAonSync();
/* now proceed to transition to Power_STANDBY ... */
/* 5. Query and save domain states before powering them off */
if(PRCMPowerDomainStatus(PRCM_DOMAIN_RFCORE) == PRCM_DOMAIN_POWER_ON){
poweredDomains |= PRCM_DOMAIN_RFCORE;
}
if(PRCMPowerDomainStatus(PRCM_DOMAIN_SERIAL) == PRCM_DOMAIN_POWER_ON){
poweredDomains |= PRCM_DOMAIN_SERIAL;
}
if(PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) == PRCM_DOMAIN_POWER_ON){
poweredDomains |= PRCM_DOMAIN_PERIPH;
}
/* 6. Gate running deep sleep clocks for Crypto and DMA */
PRCMPeripheralDeepSleepDisable(PRCM_PERIPH_CRYPTO);
PRCMPeripheralDeepSleepDisable(PRCM_PERIPH_UDMA);
/* 7. Make sure clock settings take effect */
PRCMLoadSet();
/* 8. Request power off of domains in the MCU voltage domain */
PRCMPowerDomainOff(poweredDomains | PRCM_DOMAIN_CPU);
/* 9. Request uLDO during standby */
PRCMMcuUldoConfigure(true);
/* 10. If don't want VIMS retention in standby, disable it now... */
if (retainCache == false){
/* 10.1 Get the current VIMS mode */
do{
modeVIMS = VIMSModeGet(VIMS_BASE);
}while (modeVIMS == VIMS_MODE_CHANGING);
/* 10.2 If in a cache mode, turn VIMS off */
if (modeVIMS == VIMS_MODE_ENABLED){
/* 10.3 Now turn off the VIMS */
VIMSModeSet(VIMS_BASE, VIMS_MODE_OFF);
}
/* 10.4 Now disable retention */
PRCMCacheRetentionDisable();
}
/* 11. Setup recharge parameters */
SysCtrlSetRechargeBeforePowerDown(XOSC_IN_HIGH_POWER_MODE);
/* 12. Make sure all writes have taken effect */
SysCtrlAonSync();
/* 13. Invoke deep sleep to go to STANDBY */
PRCMDeepSleep();
}
2、control CC1310 exit standby:
void Exit_Power_Standby(void)
{
if (retainCache == false) {
if (modeVIMS == VIMS_MODE_ENABLED){
VIMSModeSet(VIMS_BASE, modeVIMS);
}
PRCMCacheRetentionEnable();
}
AONWUCAuxWakeupEvent(AONWUC_AUX_WAKEUP);
PRCMPowerDomainOn(poweredDomains);
PRCMPeripheralDeepSleepEnable(PRCM_PERIPH_CRYPTO);
PRCMPeripheralDeepSleepEnable(PRCM_PERIPH_UDMA);
PRCMLoadSet();
PRCMMcuUldoConfigure(false);
while (PRCMPowerDomainStatus(poweredDomains) != PRCM_DOMAIN_POWER_ON);
SysCtrlAonSync();
AONIOCFreezeDisable();
SysCtrlAonSync();
while(!(AONWUCPowerStatusGet() & AONWUC_AUX_POWER_ON)) {};
OSCHF_TurnOnXosc();
OSCClockSourceSet(OSC_SRC_CLK_LF, OSC_XOSC_LF);
}
Now wake up can light an LED, but wireless can not work.I have tried to switch wireless power and clock without going into standby mode, and wireless is working.
Can you give me some help? What should i do?