Leveraging debug UART logs for power profiling
Leveraging debug UART logs for power profiling
Visualizing the energy consumption profile of your embedded IoT device marks the initial step toward achieving low-power design and extended battery life. The subsequent step of power profiling is analysis, where you can make a significant impact on your energy optimization efforts.
See what drains the energy of your IoT devices
One of the most efficient ways of understanding what actually drain the energy is to connect the power measurements with the actual behaviour of the device. Regardless if your are iterating hardware, firmware or connectivity and application settings, you most likely have prepared your device to output a lot of data and debug reports. If your have done this on UART you are in for treat. Otii Arc Pro and Otii Ace Pro come with a clever feature: UART log output sync with power measurements.
Otii Arc and Ace Pro’s ability to synchronize expansion port and power measurements while capturing and analyzing UART data offers a powerful solution for debugging and optimizing power consumption during the development and testing phases.
UART log output sync with Otii software
An exceptional feature of Otii Arc/Ace Pro is its ability to correlate UART messages with the power consumption graph. When you mark a specific area on the current graph, all the UART messages that occurred within that time-frame are highlighted in the UART log. Additionally, you can also reverse this process by marking one or multiple messages in the UART log, which will then highlight the corresponding time-frame on the current graph. This feature provides you with invaluable insights into how your device’s code execution affects its power consumption.
If you need to save or share the UART records for further analysis or documentation, Otii Arc Pro makes it easy. Simply select one or multiple messages, and you can copy them using the standard keyboard shortcut.
UART impact on power consumption
To maximize the efficiency of this setup, remember to disable UART messages in your device’s firmware when it’s ready for production. This prevents unnecessary energy consumption and ensures that your device operates at its most power-efficient state. Here you can read more tips and tricks working with UART and insight on what really happens when you do forget to turn it off.
How to use UART log sync with power profiling
Before you can start synchronizing expansion port and power measurements, you need to connect your embedded device to Otii Arc/Ace Pro. Follow these steps to ensure a seamless setup:
Step 1: Connect your device to the mains of Otii hardware.
This step provides the necessary power supply to your embedded device, ensuring that it operates as intended during testing.
Step 2: Connect the UART output from your MCU on the device under test to the Otii hardware expansion port RX. If your device can send commands through UART, also connect TX. For Otii Ace Pro, remember to connect DGND to the main ground, as the main channel and expansion port are isolated.
This connection allows Otii Arc/Ace Pro to capture UART data from your device, including debug information and timestamps.
Connecting device under test to Otii hardware
Step 3: Configure the Digital voltage level for your device in the General Settings within the Otii application. Enable the UART channel and choose the correct Baud rate for your device.
Configuring these settings correctly ensures that Otii Arc/Ace Pro can accurately capture and interpret UART data from your device.
Step 4: Power profile and analyze the UART prints.
Once you’ve completed the setup, you can start analyzing the UART data. The UART prints will be displayed in real-time within the UART log window. You can choose to view the data with relative time, wall time or no time.
UART log are synced with power measurements collected with Otii hardware.
Step 5: Copy the UART records.
If you need to save or share the UART records for further analysis or documentation, simply select one or multiple messages, and you can copy them using the standard keyboard shortcut (Ctrl-C/Cmd-C) or by right-clicking and selecting “Copy log.”
In conclusion, Otii Arc/Ace Pro offers sync between the expansion port and power measurements while capturing and analyzing UART data, providing an efficient solution for debugging power consumption during the development and testing phases. Understanding what drains the energy gives insights in how your IoT device operates enabling informed decisions to create low-power electronic devices.
See documentation.
Would you like to know more?
Become a member of our community
Gain access to exclusive resources, educational materials, and expert advice to enhance your knowledge and understanding of powering IoT devices and battery testing.