Microcontroller Debugging via On-Chip Trace Encoding

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing debugging systems for firmware on microcontrollers require high bandwidth and memory, which is costly and inefficient, especially for one-time programmable memories, and often necessitate dedicated pins and high-frequency systems, making real-time debugging complex and expensive.

Innovation Solution

A low-bandwidth real-time trace debugging system that uses an on-chip debugger to encode and transmit minimal information, such as entry and exit data, and program counter values, allowing for error correction at the external debugger unit, reducing the need for high-speed components and memory, and utilizing lower frequency interfaces.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional real-time debugging systems are used, then debugging capability is achieved, but memory requirements and bandwidth requirements increase significantly

Engineering Contradiction:
Improvedebugging capabilityVSAvoidmemory requirements
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential debugging information (entry data, exit data, goto data) from the complete firmware execution trace, storing and transmitting only this selective subset rather than all execution data. This dramatically reduces memory and bandwidth requirements while maintaining effective debugging capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The debugging information is segmented into three distinct data types: entry data (function entry points), exit data (function exit points), and goto data (jump targets). This segmentation allows the system to track firmware flow effectively using minimal data points rather than storing complete execution traces.

Inventive Principle:
Principle #1Segmentation

2Productivity

If high bandwidth interfaces are used for real-time debugging, then debugging speed is improved, but system cost and complexity increase

Engineering Contradiction:
Improvedebugging speedVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs partial action by transmitting only the minimum necessary debugging information (entry, exit, and goto data) rather than complete execution traces. This allows effective debugging at lower bandwidth interfaces, reducing system complexity and cost while maintaining adequate debugging speed.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If complete firmware flow data is stored, then debugging accuracy is improved, but silicon area and memory cost increase

Engineering Contradiction:
Improvedebugging accuracyVSAvoidsilicon area
Core Design Contradiction:
Measurement precisionVSArea of stationary object

Solution Approach 1:

The patent extracts only the critical path information needed for debugging (entry points, exit points, and jump targets) from the complete firmware execution flow. This selective extraction maintains debugging accuracy by capturing all control flow transitions while using minimal storage space on the silicon chip.

Inventive Principle:
Principle #2Taking out (Extraction)

4Speed

If high frequency components are used in the debugging system, then real-time performance is improved, but cost and power consumption increase

Engineering Contradiction:
Improvereal-time performanceVSAvoidpower consumption
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The system uses partial action by transmitting minimal debugging data at lower frequencies. The reduced data volume allows the use of lower frequency components that consume less power, while still achieving real-time debugging performance through efficient data selection rather than brute-force high-speed transmission of all execution data.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11442805B1System and method for debugging microcontroller using low-bandwidth real-time trace
Publication Date: 2022.09.13 L&T SEMICONDUCTOR TECHNOLOGIES LTD
  • US11442805B1 patent drawing
  • US11442805B1 patent drawing
  • US11442805B1 patent drawing

AI summary

The present disclosure relates to a system for real-time debugging of microcontroller, the system includes a microcontroller configured in an embedded device to execute a set of instructions, the microcontroller includes a counter unit that generates a set of values for the executed set of instructions. An on-chip debugger (OCD) fetches a selective set of data packets of the set of instructions from the microcontroller. An encoder encodes the selective set of data packets to store the encoded set of data packets in a storage unit, wherein encoding of the set of data packets is performed to compress the data for minimal information size such that the external debugger unit (EDU) receives the encoded set of data packets with minimal information size through the external interface.