Skip to content

Latest commit

 

History

History

2_SleepMode

Tiva C TM4C123G LaunchPad Sleep Mode

This sleep mode project shows you how to put the processor into sleep mode

In the BringUp project, main loop calls WaitForInterrupt(); to enter sleep mode. Does it actually do what you want?

This project includes CpuUsage module to monitor the number of clock cycles in which CPU actually does something. Between SYSTICK cycle, CPU only uses some of its clock cycle to do its jobs. TIMER2 will only count those clock cycle when CPU is working.

Measurement

SLEEP MODE OFF

In the default BringUp project, CPU is running at 5%

SLEEP MODE ON

Turn on definition of USE_SLEEP_MODE in BuildConfig.h. This definition will enable:

  • Activate clock on peripherals even CPU goes sleeping
  • Enable peripherals to operate when CPU is in sleep Now, CPU runs at 0%, and goes up when buttons are pressed. Because it is in sleep, some extra clock cycles are needed to exit sleep mode, which make CPU Usage could peak at 6% or more.

sleep_mode_off.png sleep_mode_on.png

Hardware

Software

  • Install TI's Code Composer Studio
  • Install TivaWare for C Series
  • Include your Tivaware folder into project, you can use the macro TI_TIVAWARE_ROOT in vars.ini
  • Change the heap size as you want
  • To use ROM_function() you must define part number of this kit TARGET_IS_TM4C123_RB1
  • You can flash to the board via CCS or TI's LM Flash Programmer

Licensing

The MIT License applies to this software and its supporting documentation: