Part Number: CC2652R7
Sleep Mode and Wake-Up Issues
I am currently developing a product using the CC2652R7. I am using SDK version simplelink_cc13xx_cc26xx_sdk_8_32_00_07.
The following is my main() function:
int main()
{
/* Register Application callback to trap asserts raised in the Stack */
RegisterAssertCback(AssertHandler);
Board_initGeneral();
PowerCC26X2_ResetReason resetReason = PowerCC26X2_getResetReason();
if (resetReason == PowerCC26X2_RESET_SHUTDOWN_IO) {
//Press the button to wake up the system; the program will run normally.
} else {
// Other cases (cold boot or manual reset) → Enter standby mode and wait for a button press to wake up
int i;
for(i=0; i<31; i++)
GPIO_setConfig(i, GPIO_CFG_INPUT | GPIO_CFG_IN_NOPULL);
GPIO_setConfig(6, GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_FALLING);
GPIO_clearInt(6);
GPIO_enableInt(6);
//Shutdown
Power_shutdown(0, 0);
}
// Enable iCache prefetching
VIMSConfigure(VIMS_BASE, TRUE, TRUE);
// Enable cache
VIMSModeSet(VIMS_BASE, VIMS_MODE_ENABLED);
#if !defined( POWER_SAVING )
/* Set constraints for Standby, powerdown and idle mode */
// PowerCC26XX_SB_DISALLOW may be redundant
Power_setConstraint(PowerCC26XX_SB_DISALLOW);
Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
#endif // POWER_SAVING
/* Update User Configuration of the stack */
user0Cfg.appServiceInfo->timerTickPeriod = Clock_tickPeriod;
user0Cfg.appServiceInfo->timerMaxMillisecond = ICall_getMaxMSecs();
/* Initialize ICall module */
ICall_init();
/* Start tasks of external images - Priority 5 */
ICall_createRemoteTasks();
#ifdef PTM_MODE
/* Start task for NPI task */
NPITask_createTask(ICALL_SERVICE_CLASS_BLE);
#endif // PTM_MODE
Myapp_createTask();
SimplePeripheral_createTask();
/* enable interrupts and start SYS/BIOS */
BIOS_start();
return 0;
}
My original intention was for the system to enter shutdown mode after power-on or a reset, and then wait for a button press to wake it up. I connected a 1000k pull-up resistor and a button to IO6; pressing the button grounds IO6.
The problem now is that with this configuration, IO6 cannot wake up the program. Is there something wrong with my code, and what is the correct way to implement this?