hi,各位工程师好,
我最近再遇到从机SimpleBLEPeripheral进不了低功耗的问题,就先拿TI的示例代码来调试。板子用的是TI原厂的开发板,工程设置中开启了Power_saving,又在工程中不启动 SBP_PERIODIC_EVT事件,然后发现在以下函数
void osal_pwrmgr_powerconserve( void )
{
uint32 next;
halIntState_t intState;
// Should we even look into power conservation
if ( pwrmgr_attribute.pwrmgr_device != PWRMGR_ALWAYS_ON )
{
// Are all tasks in agreement to conserve
if ( pwrmgr_attribute.pwrmgr_task_state == 0 )
{
// Hold off interrupts.
HAL_ENTER_CRITICAL_SECTION( intState );
// Get next time-out
next = osal_next_timeout();
// Re-enable interrupts.
HAL_EXIT_CRITICAL_SECTION( intState );
// Put the processor into sleep mode
OSAL_SET_CPU_INTO_SLEEP( next );
}
}
}
pwrmgr_attribute.pwrmgr_device 一直等于 PWRMGR_ALWAYS_ON,导致进入不了低功耗。我猜测有东西没关掉一直在跑,特向各位工程师求助