Supply current consumption acquisition synchronized with debug data trace
AssigneesSTMicroelectronics (Grenoble 2) SAS, STMicroelectronics (Rousset) SAS
InventorsSylvain CHAVAGNAT, Simon VALCIN
Life of this patent
Estimating the term…
Abstract
Disclosed herein is a debug system including a host computer, a microcontroller, and a debug probe for interface therebetween for performing debug trace operations. The debug probe samples the current drawn by the microcontroller. The debug probe and host computer cooperate so as to acquire and accurately align trace data and the samples of the current drawn by the microcontroller. Techniques for performing this alignment are described herein and enable for accurate inferences to be drawn about the current drawn by the microcontroller during different program operations.
Claims18
A system, comprising:
- a microcontroller including a microprocessor;
- a debug probe;
- a host configured to, upon startup of the microcontroller, send debug instructions to the debug probe that, when executed by the microcontroller, begin execution of a debug trace within the microcontroller;
- wherein the debug probe is configured to send the debug instructions to the microcontroller;
- wherein the microcontroller is configured to execute the debug trace according to said debug instructions to generate trace data, the trace data including trace data time stamps;
- wherein the debug probe is further configured to:
- receive a power signal from the host;
- and sample the power signal and provide the power signal to the microcontroller, with each sampling of the power signal occurring during a different power acquisition cycle;
- wherein the host is further configured to periodically send synchronization requests to the debug probe;
- wherein the debug probe is further configured to, in response to receipt of each synchronization request:
- retrieve a current power acquisition cycle number;
- generate an intermediate synchronization request;
- and send the intermediate synchronization request to the microcontroller;
- wherein the microcontroller is further configured to, in response to receipt of each intermediate synchronization request, send a message to the debug probe, the message including a current execution cycle number of the microprocessor and an associated cycle number time stamp;
- wherein the debug probe is further configured to:
- send the trace data to the host;
- send the messages to the host;
- and send the sampled power signal to the host;
- wherein the host is configured to;
- determine a trace data time stamp within the trace data where the sampling of the power signal began;
- derive a frequency of the microprocessor from the trace data;
- determine a ratio between a sampling rate of the power signal and the frequency of the microprocessor;
- and
- align the trace data and the samples of the power signal based upon the ratio and the trace data time stamp within the trace data where the sampling of the power signal began.
A method of aligning trace data and power consumption data in a debugging system, the method comprising:
- send debug instructions to a microcontroller within the debug system, the debug instructions, when executed by the microcontroller, begin execution of a debug trace;
- receive a power signal from a host within the debug system;
- sample the power signal and provide the power signal to the microcontroller, with each sampling of the power signal occurring during a different power acquisition cycle;
- in response to receipt of each of a number of periodic synchronization requests:
- retrieve a current power acquisition cycle number;
- generate an intermediate synchronization request;
- and send the intermediate synchronization request to the microcontroller;
- receive trace data from the microcontroller, the trace data including trace data time stamps;
- receive from the microcontroller, in response to the sending of each intermediate synchronization request, a message, the message including a current execution cycle number of a microprocessor within the microcontroller and an associated cycle number time stamp;
- and
- send the trace data to the host, send the messages to the host, and send the sampled power signal to the host so that the host aligns the trace data and the samples of the power signal based upon a trace data time stamp within the trace data where the sampling of the power signal began and a ratio between a sampling rate of the power signal and a frequency of the microprocessor.
A method of aligning trace data and power consumption data in a debugging system, the method comprising:
- upon startup of a microcontroller within the debugging system, send debug instructions from a host within the debugging system to a debug probe within the debugging system that, when executed by the microcontroller, begin execution of a debug trace;
- transmit the debug instructions from the debug probe to the microcontroller;
- execute the debug trace at the microcontroller according to said debug instructions to generate trace data, the trace data including trace data time stamps;
- receive a power signal, at the debug probe, from the host;
- sample the power signal at the debug probe and provide the power signal to the microcontroller, with each sampling of the power signal occurring during a different power acquisition cycle;
- periodically send synchronization requests from the host to the debug probe;
- in response to receipt of each synchronization request at the debug probe:
- retrieve a current power acquisition cycle number;
- generate an intermediate synchronization request;
- and send the intermediate synchronization request from the debug probe to the microcontroller;
- in response to receipt of each intermediate synchronization request at the microcontroller, send a message to the debug probe, the message including a current execution cycle number of a microprocessor within the microcontroller and an associated cycle number time stamp;
- send the trace data from the debug probe to the host;
- send the messages from the debug probe to the host;
- send the sampled power signal from the debug probe to the host;
- determine a trace data time stamp within the trace data where the sampling of the power signal began, at the host;
- derive a frequency of the microprocessor from the trace data, at the host;
- determine a ratio between a sampling rate of the power signal and the frequency of the microprocessor, at the host;
- and
- align the trace data and the samples of the power signal based upon the ratio and the trace data time stamp within the trace data where the sampling of the power signal began, at the host.
A system, comprising:
- a microcontroller including a microprocessor;
- a debug probe;
- a host;
- wherein the microcontroller is configured to execute a debug trace to generate trace data, the trace data including trace data time stamps;
- wherein the debug probe is further configured to:
- receive a power signal from the host;
- and sample the power signal and provide the power signal to the microcontroller, with each sampling of the power signal occurring during a different power acquisition cycle;
- wherein the host is further configured to periodically send synchronization requests to the debug probe;
- wherein the debug probe is further configured to, in response to receipt of each synchronization request:
- retrieve a current power acquisition cycle number;
- generate an intermediate synchronization request;
- and send the intermediate synchronization request to the microcontroller;
- wherein the microcontroller is further configured to, in response to receipt of each intermediate synchronization request, send a message to the debug probe, the message including a current execution cycle number of the microprocessor and an associated cycle number time stamp;
- wherein the debug probe is further configured to:
- send the trace data to the host;
- send the messages to the host;
- and send the sampled power signal to the host;
- and
- wherein the host is configured to align the trace data and the samples of the power signal based upon a trace data time stamp within the trace data where the sampling of the power signal began, the trace data, and a sampling rate of the power signal.
Dependencies are inferred from the claim text.