Step 7.1: Build and program the application
Step 7.2: Observe current consumption on the Data Visualizer
The Data Visualizer is a tool used to measure the power consumption of the device.
The Data Visualizer is a program to process and visualize data. The Data Visualizer is capable of receiving data from various sources such as the EDBG Data Gateway Interface (DGI) and COM ports. Track your application's run-time using a terminal graph or oscilloscope, or analyze the power consumption of your application through correlation of code execution and power consumption, when used together with a supported probe or board. Having full control of your codes’ run-time behavior has never been easier.
2
Click on the Connect button to have the Data Visualizer ready to receive information from the Power Debugger Data Gateway.
3
After the Data Visualizer is connected to the Power Debugger Data Gateway, select the Power interface and click on the Start button.
4
On the right-hand side of the Power Analysis window, click on the Control Panel tab and Disable Channel B.
The accompanying image shows the device in Standby mode, smaller peaks are the 500ms timer expiry peaks.
Cover the light sensor on the IO Xplained Pro board (by placing your hand over it) to print the temperature on the terminal. The following image shows the power consumption values in Standby mode and CPU Active mode.
Press Switch SW0 to switch from Standby mode to Idle mode. The following image shows the transition power consumption values from Standby to Idle mode. Idle mode consumes more power compared to Standby mode.
Place your hand nearer to the light sensor. The device wakes up, reads and prints the temperature value on the serial console, and re-enters the Standby mode. The following image shows the transition power consumption values from Idle to Standby mode.
5
Note that from the above results the power consumption is low in Standby mode compared to Idle mode.
Step 7.3: Wake Up time measurement using Logic Analyser/CRO
Logic Analyser or CRO can be used to measure device wake-up time.
1
Relatively, the wake-up time is more in Standby mode compared to Idle mode, since the CPU and all peripherals will be stopped.
To demonstrate the CPU wake-up time, switch SW0 is configured to generate an interrupt. A General Purpose Input/Output (GPIO) is toggled in the Interrupt Service Routine (ISR) of the switch press event. The MCU comes out of the Sleep mode when an interrupt occurs (in this case, the switch press interrupt). The time between the switch press and the GPIO toggle in the ISR is wake-up time.
Press the switch SW0 and capture the signals to measure the wake-up time in Standby and Idle mode.
Setup Trigger (High to Low) on SWITCH0 probe is configured to capture the signals.
The following image shows the time taken to wake up the device from Standby mode.
The following image shows the time taken to wake up the device from Idle mode.
By observing the outputs, you can conclude that wake-up time is more in Standby mode compared to Idle mode.
Results
You successfully created a low power application using SAMC21 Xplained Pro Evaluation Kit and I/O1 Xplained Pro Kit and experienced how, where, and which Low Power mode to use depending on the application requirements like power and wake up response times.
Analysis
In this lab, you have successfully created a project from scratch, added Peripheral Libraries (PLIBs) and learned how to use an Event System to drive events received from the peripherals without CPU intervention. You also learned how to configure a device to work in Sleep modes and measure wake up time.
Conclusions
In this tutorial, you discovered how to configure the device to work in Sleep modes, this tutorial can be used as a reference when you develop a real-time application where the power and wake up response time plays a crucial role.