A debug port is a diagnostic interface (akin to a
computer port) included in an electronic system or
integrated circuit
An integrated circuit (IC), also known as a microchip or simply chip, is a set of electronic circuits, consisting of various electronic components (such as transistors, resistors, and capacitors) and their interconnections. These components a ...
to aid
design
A design is the concept or proposal for an object, process, or system. The word ''design'' refers to something that is or has been intentionally created by a thinking agent, and is sometimes used to refer to the inherent nature of something ...
,
fabrication
Fabrication may refer to:
* Manufacturing, specifically the crafting of individual parts as a solo product or as part of a larger combined product.
Processes in arts, crafts and manufacturing
*Semiconductor device fabrication, the process used t ...
,
development
Development or developing may refer to:
Arts
*Development (music), the process by which thematic material is reshaped
* Photographic development
*Filmmaking, development phase, including finance and budgeting
* Development hell, when a proje ...
,
bootstrapping
In general, bootstrapping usually refers to a self-starting process that is supposed to continue or grow without external input. Many analytical techniques are often called bootstrap methods in reference to their self-starting or self-supporting ...
,
configuration
Configuration or configurations may refer to:
Computing
* Computer configuration or system configuration
* Configuration file, a software file used to configure the initial settings for a computer program
* Configurator, also known as choice board ...
,
debugging
In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs.
For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
, and
post-sale in-system programming. In general terms, a debug port is not necessary for end-use function and is often hidden or disabled in finished products.
When constituted in a
high availability
High availability (HA) is a characteristic of a system that aims to ensure an agreed level of operational performance, usually uptime, for a higher than normal period.
There is now more dependence on these systems as a result of modernization ...
or
safety critical
A safety-critical system or life-critical system is a system whose failure or malfunction may result in one (or more) of the following outcomes:
* death or serious injury to people
* loss or severe damage to equipment/property
* environmental h ...
system, a debug port may continue to operate as a
system monitor
A system monitor is a hardware or software component used to monitor system resources and performance in a computer system.
Among the management issues regarding use of system monitoring tools are resource usage and privacy. Monitoring can tra ...
for integrity validation in the finished product. In low-cost or high-volume electronics, debug ports are sometimes left enabled to avoid costs of design changes, and can be used by
modders and hackers to gain control of the device or access to extra functionality. To avoid this, some manufacturers may choose to add passkey which needs to be sent over the debug port first before accessing the functionality, and this passkey usually is known only to the manufacturer and/or authorized entities like service/repair centers.
Hardware debug ports
*
UART
A universal asynchronous receiver-transmitter (UART ) is a peripheral device for asynchronous serial communication in which the data format and transmission speeds are configurable. It sends data bits one by one, from the least significant to ...
* Ubiquitous
JTAG
JTAG (named after the Joint Test Action Group which codified it) is an industry standard for verifying designs of and testing printed circuit boards after manufacture.
JTAG implements standards for on-chip instrumentation in electronic design ...
ports on
ICs
*
Low Pin Count
The Low Pin Count (LPC) bus is a computer bus used on IBM-compatible personal computers to connect low-bandwidth devices to the CPU, such as the BIOS ROM (BIOS ROM was moved to the Serial Peripheral Interface (SPI) bus in 2006), "legacy" I/O ...
debug port on the original
Xbox
Xbox is a video gaming brand that consists of four main home video game console lines, as well as application software, applications (games), the streaming media, streaming service Xbox Cloud Gaming, and online services such as the Xbox networ ...
, used by modders
*
Serial Wire Debug (SWD), ubiquitous on Arm
Cortex-M microcontrollers
*
Background Debug Mode interface (BDM)
*
Program and Debug Interface
*
Nexus debug
Debug ports on microprocessors
Microprocessors are exceptionally complex devices which commonly contain more than a billion transistors internally and sometimes exceed more than one trillion. Debug ports are utilized during development of
bare metal programs and
driver software
In the context of an operating system, a device driver is a computer program that operates or controls a particular type of Peripheral, device that is attached to a computer or automaton. A driver provides a software Interface (computing), inter ...
on microprocessors. Debug ports can provide a range of useful features for developers including accessing internal state of the microprocessor which helps developers understand any
exceptions occurring, memory transfers happening, and other events taking place during the normal execution of the program which otherwise may have been difficult to observe.
Debug ports on microcontrollers
Microcontrollers are generally smaller than mainstream CPUs, but have now evolved so far into
system on a chip
A system on a chip (SoC) is an integrated circuit that combines most or all key components of a computer or Electronics, electronic system onto a single microchip. Typically, an SoC includes a central processing unit (CPU) with computer memory, ...
(SoC) territory, that an MCU can be nearly the only complex chip remaining on an end-use application board (with additional chips devoted to specialized electrical functions such as
level shifting and enhanced
ESD protection).
SoC MCUs usually use internal
flash memory
Flash memory is an Integrated circuit, electronic Non-volatile memory, non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for t ...
as a program store and may also contain internal
EEPROM
EEPROM or E2PROM (electrically erasable programmable read-only memory) is a type of non-volatile memory. It is used in computers, usually integrated in microcontrollers such as smart cards and remote keyless systems, or as a separate chip d ...
-based configuration fuses whose correct configuration is essential to the MCU powering up in the correct operating mode; the debug port may be the ''only'' way to initially configure the
clock tree
In electronics and especially synchronous digital circuits, a clock signal (historically also known as ''logic beat'') is an electronic logic signal (voltage or current) which oscillates between a high and a low state at a constant frequency and i ...
or to load the first software program post-manufacture.
USB Device Firmware Upgrade
Since around 2010, a broad class of MCUs now have integrated
USB
Universal Serial Bus (USB) is an industry standard, developed by USB Implementers Forum (USB-IF), for digital data transmission and power delivery between many types of electronics. It specifies the architecture, in particular the physical ...
peripherals with device firmware upgrade (DFU) in factory ROM.
This class of MCUs appeals to hobbyists who do not wish to invest in the hardware tools needed to access specialized debug ports such as
JTAG
JTAG (named after the Joint Test Action Group which codified it) is an industry standard for verifying designs of and testing printed circuit boards after manufacture.
JTAG implements standards for on-chip instrumentation in electronic design ...
.
These devices are designed to be resistant to being
bricked
A brick (or bricked device) is a mobile device, game console, router, computer or other electronic device that is no longer functional due to corrupted firmware, a hardware problem, or other damage. The term analogizes the device to a brick ...
. A bad firmware load is easily recovered by holding a special pin in the active state, which caused the chip to boot up using its internal factory
ROM
Rom, or ROM may refer to:
Biomechanics and medicine
* Risk of mortality, a medical classification to estimate the likelihood of death for a patient
* Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac
* ...
, which makes a programming interface available through its built-in USB controller. DFU can be viewed as a form of debug port implemented in software rather than hardware. However, this largely defeats the debug functionality of a dedicated hardware debug port, as it is inherently fragile to debug software which also implements your debug interface—but only when functioning correctly.
See also
*
Board support package
*
Electronic design automation
Electronic design automation (EDA), also referred to as electronic computer-aided design (ECAD), is a category of software tools for designing Electronics, electronic systems such as integrated circuits and printed circuit boards. The tools wo ...
*
In-circuit emulation
*
In-system programming
*
In-target probe
*
Microcontroller
A microcontroller (MC, uC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Pro ...
*
Microprocessor
A microprocessor is a computer processor (computing), processor for which the data processing logic and control is included on a single integrated circuit (IC), or a small number of ICs. The microprocessor contains the arithmetic, logic, a ...
*
POST card
In computing, a POST card is a plug-in diagnostic Expansion card, interface card that displays progress and error codes generated during power-on self-test (POST) of a computer. It is used to troubleshoot computers that do not Booting, start ...
*
System on a chip
A system on a chip (SoC) is an integrated circuit that combines most or all key components of a computer or Electronics, electronic system onto a single microchip. Typically, an SoC includes a central processing unit (CPU) with computer memory, ...
References
{{reflist
Hardware testing