工具/软件:
嗨、
因此、我的团队成员和我一直在尝试确定 TI-CC2652R7 的最低功耗。 我们从 project_zero 示例开始、我们不启动 project_zero 线程、而是启动测试线程、并在信标处停止。 进行功耗测量时、平均值为 9uA。 然而、根据数据表、我们应该在待机模式下获得 0.9uA 的电流。 我知道我们的电路可能有问题、但如果您可以确认我进入待机状态的方法是正确的、我们将非常感激。
int main()
{
// Register Application callback to trap asserts raised in the Stack
RegisterAssertCback(AssertHandler);
Board_initGeneral();
#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();
#ifndef STACK_LIBRARY
{
// Find stack entry page
uint32_t stackAddr = findStackBoundaryAddr();
// If we cannot find the stack start address, exit
if (stackAddr == 0xFFFFFFFF)
ICall_abort();
// Set the stack image header based on the stack addr
stackImageHeader = (imgHdr_t*)stackAddr;
// Start tasks of external images - Priority 5
const ICall_RemoteTask_t remoteTaskTbl[] = { (ICall_RemoteTaskEntry)(stackImageHeader->prgEntry), 5, 1000, &user0Cfg };
// Start tasks of external images - Priority 5
ICall_createRemoteTasksAtRuntime((ICall_RemoteTask_t*)remoteTaskTbl, (sizeof(remoteTaskTbl) / sizeof(ICall_RemoteTask_t)));
}
#else
// Start tasks of external images - Priority 5
ICall_createRemoteTasks();
#endif
// Ensure low-frequency (real-time) clock initialized with external oscillator, otherwise downstream BLE and RTOS calls won't work
if (OSCClockSourceGet(OSC_SRC_CLK_LF) != OSC_XOSC_LF)
{
OSCClockSourceSet(OSC_SRC_CLK_LF, OSC_XOSC_LF);
}
#ifdef TEST_XOSC_LF
IOCPortConfigureSet(IOID_26, IOC_PORT_AON_CLK32K, IOC_STD_OUTPUT); // Pass-through external 32.768kHz oscillator clock signal (XOSC LF) out to TP1
AONIOC32kHzOutputEnable();
#endif
test();
// Enable interrupts and start SYS/BIOS
BIOS_start();
return 0;
}
static array<uint8_t, 3092> test_stack;
void test()
{
// Wrapper for creating a thread
Thread(TestThread, nullptr, make_shared<Thread::Settings>(test_stack.data(), test_stack.size()));
}
void* TestThread(void* arguments)
{
// Wrapper for creating a semaphore
Semaphore sem;
sem.wait();
return nullptr;
}
此致、
Kenneth T.