Other Parts Discussed in Thread: CC3351, SYSCONFIG, ENERGYTRACE
Tool/software:
Hello TI Community,
I'm developing a low-power application on the CC3351 that requires the device to spend most of its time in standby mode. The system includes:
- Sensor Controller with ADC and capacitive touch tasks
- CC3351 configured as an MQTT client
- FreeRTOS-based application
Issue Description: Currently, I'm attempting to verify standby mode operation with a simplified test case (sensor controller and MQTT functionality disabled). However, the device appears to remain in active mode despite implementing the following main loop:
while (1) {
vTaskDelay(pdMS_TO_TICKS(500));
switch(state) {
case STATE_INIT:
state = STATE_SLEEPING_WITH_TOUCH;
break;
case STATE_SLEEPING_WITH_TOUCH:
if (++debugCounter >= 20) {
debugCounter = 0;
// Additional debug code here
}
break;
}
}
Debugging Steps Taken:
- Power Constraints Verification:
void debug_constraints() {
uint_fast32_t constraints = Power_getConstraintMask();
LOG_INFO("Current constraints: 0x%08X", constraints);
if (constraints & (1 << PowerCC26XX_DISALLOW_STANDBY)) {
LOG_INFO("STANDBY is BLOCKED");
}
}
Output: [14:28:06.458] [MAIN::INFO] Current constraints: 0x00000000
- Standby Latency Check:
uint32_t standbyLatency = Power_getTransitionLatency(PowerCC26XX_STANDBY, Power_TOTAL);
LOG_INFO("Standby latency: %d us", standbyLatency);
Output: [14:30:08.027] [MAIN::INFO] Standby latency: 1000 us
- Clock Source Verification:
LOG_INFO("---------------------------Testing LF and HF quartz-----------------------------------");
OSCHF_TurnOnXosc();
// Ensure switch to XOSC
while (!OSCHF_AttemptToSwitchToXosc()) {
vTaskDelay(pdMS_TO_TICKS(10));
}
LOG_INFO("HF crystal real amplitude : %d mv", OSCHF_DebugGetCrystalAmplitude());
LOG_INFO("HF crystal expected amplitude : %d mv", OSCHF_DebugGetExpectedAverageCrystalAmplitude());
uint32_t hf_source = OSCClockSourceGet(OSC_SRC_CLK_HF);
if (hf_source == OSC_XOSC_HF) {
LOG_INFO("HF crystal source: XOSC");
} else if (hf_source == OSC_RCOSC_HF) {
LOG_INFO("HF crystal source: RC clock");
} else {
LOG_ERROR("HF crystal source: Invalid configuration (value: %d)", hf_source);
}
uint32_t lf_source = OSCClockSourceGet(OSC_SRC_CLK_LF);
if (lf_source == OSC_XOSC_LF) {
LOG_INFO("LF crystal source: XOSC");
} else if (lf_source == OSC_RCOSC_LF) {
LOG_INFO("LF crystal source: RC clock");
} else {
LOG_ERROR("LF crystal source: Invalid configuration (value: %d)", lf_source);
}
LOG_INFO("----------------------------------------------------------------------------------------");
Clock Verification Output:
[14:37:04.538] [MAIN::INFO] ---------------------------Testing LF and HF quartz-----------------------------------
[14:37:04.618] [MAIN::INFO] HF crystal real amplitude : 495 mv
[14:37:04.618] [MAIN::INFO] HF crystal expected amplitude : 465 mv
[14:37:04.618] [MAIN::INFO] HF crystal source: XOSC
[14:37:04.618] [MAIN::INFO] LF crystal source: XOSC
[14:37:04.618] [MAIN::INFO] ----------------------------------------------------------------------------------------
Observations:
- No power constraints are active (0x00000000)
- Both HF and LF clocks are successfully running on XOSC
- Crystal amplitude is within expected range
- Power policy is configured in SysConfig with appropriate settings
- Unfortunately, EnergyTrace++ is not functional in the current CCS version, preventing direct power mode verification
Questions:
- Are there additional requirements beyond constraint clearing and clock configuration to enable automatic standby transitions?
- Could FreeRTOS task scheduling be preventing standby entry despite the 500ms delay?
- Is there a recommended method to verify standby mode entry without EnergyTrace++?
Any insights would be greatly appreciated. Thank you!