IP Library › Granted Patent US 12,566,484
Granted Patent B2
US 12,566,484 · App. 18/740,786 · Granted Mar 3, 2026

Supply current consumption acquisition synchronized with debug data trace

Inventors: Sylvain Chavagnat (Saint Nicolas de Macherin, FR); Simon Valcin (Trets, FR)
Assignee: STMicroelectronics International N.V.
G06F1/3243
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,566,484
App. No.
18/740,786
Granted
Mar 3, 2026
Kind
B2
Abstract

A method is for synchronizing power consumption data with trace data in a microcontroller debugging system. The method involves periodically sending synchronization requests from a host device to a synchronization manager within a debug probe. The synchronization manager retrieves the current power acquisition cycle number from a power acquisition circuit in response to each request, corresponding to a current sample of microcontroller power consumption. Each synchronization request, along with the retrieved cycle number, is sent to a protocol manager, which transmits the request to a microcontroller's debug-port. Upon receiving acknowledgment from the microcontroller, the protocol manager communicates these to the synchronization manager. The synchronization manager measures the latency between sending each synchronization request and receiving its acknowledgment, which is indicative of synchronization quality. Lower latency indicates higher synchronization quality, and higher latency indicates lower synchronization quality. This provides precise alignment of power consumption data with trace data for accurate debugging.

Claims (58)

1 . A method for synchronizing power consumption data with trace data in a microcontroller debugging system, the method comprising:

periodically sending, by a host device, synchronization requests to a synchronization manager of a debug probe;

retrieving, by the synchronization manager in response to each synchronization request, a current power acquisition cycle number from a power acquisition circuit of the debug probe, the current power acquisition cycle number corresponding to a current sample of power consumption of a microcontroller under test;

sending, by the synchronization manager, each synchronization request with the retrieved current power acquisition cycle number to a protocol manager of the debug probe;

transmitting, by the protocol manager, each synchronization request to a debug port of the microcontroller;

receiving, by the protocol manager, an acknowledgement of each synchronization request from the debug port of the microcontroller;

measuring, by the synchronization manager, a latency comprising a number of power consumption samples taken by the power acquisition circuit between sending each synchronization request and receiving a corresponding acknowledgement; and

determining a synchronization quality based on the measured latency, wherein a lower latency indicates a higher synchronization quality and a higher latency indicates a lower synchronization quality.

2 . The method of claim 1 , further comprising:

writing, by the debug port upon receiving each synchronization request, the synchronization request to a register of an instrumentation trace macrocell (ITM) of the microcontroller;

generating, by the ITM in response to each synchronization request, an ITM message containing the current power acquisition cycle number and an associated debug trace time stamp; and

transmitting, by a trace port interface unit (TPIU) of the microcontroller, each ITM message to the protocol manager of the debug probe.

3 . The method of claim 2 , further comprising:

receiving, by the protocol manager, trace data packets from the TPIU interleaved with the ITM messages; and

transmitting, by the protocol manager, the trace data packets and the ITM messages to the host device.

4 . The method of claim 3 , further comprising:

calculating, by the host device using linear regression, a start time in the trace data corresponding to when power consumption sampling began based on the ITM messages and associated debug trace time stamps; and

aligning, by the host device, power consumption data with trace data based on the calculated start time and a ratio between a sampling rate of the power acquisition circuit and a processing core frequency of the microcontroller derived from the debug trace time stamps.

5 . The method of claim 1 , further comprising:

beginning, by the host device prior to sending the periodic synchronization requests, a debug trace operation by instructing the debug probe to send configuration instructions to the microcontroller to initiate a debug trace with a debug trace time stamp enabled.

6 . The method of claim 5 , wherein the debug trace operation begins prior to the power acquisition circuit sampling power consumption of the microcontroller.

7 . A debug probe for synchronizing power consumption data with trace data in a microcontroller debugging system, the debug probe comprising:

a power acquisition circuit configured to receive a power output from a host device, provide the power output to a microcontroller under test, and sample power consumption of the microcontroller;

a synchronization manager in communication with the power acquisition circuit and configured to receive synchronization requests from the host device and retrieve a current power acquisition cycle number from the power acquisition circuit in response to each synchronization request, the current power acquisition cycle number corresponding to a current sample of the power consumption; and

a protocol manager in communication with the synchronization manager and configured to receive the synchronization requests and the current power acquisition cycle number from the synchronization manager, transmit each synchronization request to a debug port of the microcontroller, receive an acknowledgement of each synchronization request from the debug port, and transmit the acknowledgement to the synchronization manager.

8 . The debug probe of claim 7 , wherein the synchronization manager is further configured to measure a latency comprising a number of power consumption samples taken by the power acquisition circuit between sending each synchronization request and receiving a corresponding acknowledgement from the protocol manager.

9 . The debug probe of claim 8 , wherein the measured latency is indicative of a synchronization quality, with a lower latency indicating a higher synchronization quality and a higher latency indicating a lower synchronization quality.

10 . The debug probe of claim 7 , wherein the protocol manager is further configured to receive trace data packets and instrumentation trace macrocell (ITM) messages from a trace port interface unit (TPIU) of the microcontroller, the ITM messages containing the current power acquisition cycle number and an associated debug trace time stamp, and transmit the trace data packets and the ITM messages to the host device.

11 . The debug probe of claim 10 , wherein the protocol manager transmits the trace data packets and the ITM messages to the host device in a data stream with the ITM messages interleaved with the trace data packets.

12 . The debug probe of claim 7 , wherein the protocol manager is further configured to receive, from the host device, instructions to send configuration instructions to the microcontroller to initiate a debug trace with a debug trace time stamp enabled, and transmit the configuration instructions to the debug port of the microcontroller.

13 . A system, comprising:

a microcontroller with a microprocessor;

a debug probe;

a host configured to:

send debug instructions to the debug probe at startup, initiating a debug trace within the microcontroller;

periodically send synchronization requests to the debug probe;

determine a trace data time stamp for a start of power signal sampling, derive a microprocessor frequency from trace data, determine a ratio between power signal sampling rate and microprocessor frequency, and align the trace data with power signal samples based on the ratio and trace data time stamp;

wherein the debug probe is configured to:

send debug instructions to the microcontroller;

receive and sample a power signal from the host, providing it to the microcontroller during different power acquisition cycles;

retrieve a current power acquisition cycle number and send an intermediate synchronization request to the microcontroller upon receiving each synchronization request;

receive messages from the microcontroller, including a current execution cycle number and associated time stamp; and

send trace data, messages, and sampled power signal to the host; and

wherein the microcontroller is configured to:

execute the debug trace, generating trace data with time stamps; and

respond to intermediate synchronization requests by sending messages to the debug probe.

14 . The system of claim 13 , wherein the debug probe includes a power acquisition circuit that samples the power signal.

15 . The system of claim 13 , wherein the debug probe includes a protocol manager that:

retrieves the current power acquisition cycle number;

generates and sends the intermediate synchronization request to the microcontroller; and

sends trace data, messages, and sampled power signal to the host.

16 . The system of claim 15 , wherein the protocol manager:

sends the intermediate synchronization request via a serial wire debug (SWD) protocol;

receives messages from the microcontroller via a UART protocol (SWO); and

receives trace data from the microcontroller via the SWD protocol.

17 . The system of claim 16 , wherein the message is generated within an instrument trace macrocell (ITM) within the microcontroller.

18 . The system of claim 15 , wherein the debug probe includes a power acquisition circuit that samples the power signal, and the microcontroller sends a request acknowledgement upon receiving each intermediate synchronization request; and

wherein the protocol manager measures a number of power acquisition cycles between sending each intermediate synchronization request and receiving the request acknowledgement to determine latency, which indicates accuracy of the alignment between trace data and power signal samples.

Continuity (2)
Continuation 18081011 · Dec 14, 2022
Related Publication 20240329719A1 · Oct 3, 2024
References Cited (12)
US 7987393B2 · Sohm et al. · 2011 [cited by applicant]
US 8589927B2 · Williams et al. · 2013 [cited by applicant]
US 10812350B2 · Bugge et al. · 2020 [cited by applicant]
US 20050044438A1 · Nonogaki · 2005 [cited by examiner]
US 20090254767A1 · Ford · 2009 [cited by examiner]
US 20150378423A1 · Hanssen · 2015 [cited by examiner]
US 20160349326A1 · Grafton et al. · 2016 [cited by applicant]
US 20220026490A1 · Styles · 2022 [cited by applicant]
CN 113360440A · 2021 [cited by applicant]
KR 100869953B1 · 2008 [cited by applicant]
WO 2022152806A1 · 2022 [cited by applicant]
Scherer, Balazs, et al: “Trace and Debug Port Based Watchdog Processor,” Article in Conference Record—IEEE Instrumentation and Measurement Technology Conference, May 2012, 5 pgs. [cited by applicant]