1.. zephyr:code-sample:: ti_cc13x2_cc26x2_system_off 2 :name: CC13x2/CC26x2 System Off 3 4 Exercise the various sleep modes on TI CC13x2/CC26x2 platforms. 5 6Overview 7******** 8 9This sample can be used for basic power measurement and as an example of 10the various sleep modes on TI CC13x2/CC26x2 platforms. The functional 11behavior is: 12 13* Busy-wait for 5 seconds 14* Sleep for 2 milliseconds (Idle mode) 15* Sleep for 3 seconds (Standby mode) 16* Turn the system off after enabling wakeup through a button press 17 (Shutdown mode) 18 19A power monitor (e.g. `EnergyTrace <http://www.ti.com/tool/ENERGYTRACE>`_) 20can be used to distinguish among these states. 21 22Requirements 23************ 24 25This application uses the CC13x2/CC26x2 LaunchPad for the demo. 26 27Building, Flashing and Running 28****************************** 29 30.. zephyr-app-commands:: 31 :zephyr-app: samples/boards/ti/cc13x2_cc26x2/system_off 32 :board: cc1352r1_launchxl 33 :goals: build flash 34 :compact: 35 36After flashing the device, run the code: 37 381. Unplug the USB cable from the LaunchPad and reconnect it to fully 39 power-cycle it. 402. Open UART terminal. 413. Hit the Reset button on the LaunchPad. 424. Device will turn off the external flash, which is on by default, to 43 reduce power consumption. 445. Device will demonstrate active, idle and standby modes. 456. Device will explicitly turn itself off by going into shutdown mode. 46 Press Button 1 to wake the device and restart the application as if 47 it had been powered back on. 48 49Sample Output 50================= 51 52cc1352rl_launchxl output 53------------------------ 54 55.. code-block:: console 56 57 *** Booting Zephyr OS build zephyr-v2.2.0-664-gd774727cc66e *** 58 59 cc1352r1_launchxl system off demo 60 Busy-wait 5 s 61 Sleep 2000 us (IDLE) 62 Sleep 3 s (STANDBY) 63 Entering system off (SHUTDOWN); press BUTTON1 to restart 64