This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640 - Host Test App; put to sleep forever

Other Parts Discussed in Thread: SYSBIOS

Hi,

Is there a way to put the host test app to sleep forever?  We have a special hci command to put the app to sleep for verifying sleep current.  I have verified there are no power constraints and have set all the tasks to inactive.  Below is my code:

Task_setPri(Task_handle(&npiTaskStruct), -1);
Task_setPri(Task_handle(&htaTask), -1);
NPITLUART_close();

//ICall task
Task_setPri(task, -1);
Task_setPri(ti_sysbios_knl_Task_getIdleTask(), -1);
Power_releaseConstraint(Power_SB_DISALLOW);
Power_releaseConstraint(Power_IDLE_PD_DISALLOW);
Power_sleep(ti_sysbios_family_arm_cc26xx_Power_STANDBY, NULL, NULL);

Thanks in advance,

Ben

  • Hello. Basically the solution is to not wake it up. As long as there are no BLE events scheduled and you're not communicating via the transport layer to it, it will be sleeping. There is no additional code required to do this. All you have to do is define POWER_SAVINGS in the preprocessor options.
  • Ben,

    The system goes into standby for good as long as there are no activity happening on MRDY and there are no ongoing advertisments/connections.

    Power_sleep is called by the OS in the Idle thread to go to standby. There should not be a need to change the priorities of any tasks.

    By stopping the tasks you might risk that there are other tasks/drivers that has constraints set on Standby/Idle which are not released (constraints are simply implemented as counters).

    The simplest way to test sleep current is to have -only- BIOS_start() in main. This would cause only the Idle thread to be active and the device will go to standby.

    Note the TI RTOS 2.11.01.09 has higher sleep current than necessary due to a bug. The latest version (2.13.00.06) has fixed this. See the following thread for porting details: https://e2e.ti.com/support/wireless_connectivity/f/538/t/421520 (I have not tried compiling the HostTest project with the latest version, if you try it let me know if there are issues).

    Regards,

    Svend