Debug port

A debug port is a chip-level diagnostic interface (akin to a computer port) included in an integrated circuit to aid design, fabrication, development, bootstrapping, configuration, debugging, 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 or safety critical system, a debug port may continue to operate as a system monitor 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 and/or access to extra functionality.

Due to their high complexity, debug ports are nearly universal in microprocessors (CPUs) and microcontrollers (MCUs). These are discussed below.

Hardware debug ports

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.[1]

Debug ports on microcontrollers

Microcontrollers are generally smaller than mainstream CPUs, but have now evolved so far into system on a chip (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 internal flash memory as a program store and may also contain internal EEPROM-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 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 peripherals with device firmware upgrade (DFU) in factory ROM.[2] 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.

These devices are designed to be resistant to being bricked. 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, which makes a programming interface available through its build-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

References

  1. Hruska, Joel (18 August 2020). "Cerebras Wafer Packs 2.6 Trillion-Transistor CPU With 850,000 Cores". extremetech.com. Extreme Tech. Retrieved 5 September 2020.
  2. "AN10986: USB In-System Programming with the LPC1300 (Rev. 1)" (PDF). nxp.com. NXP Semiconductors. 24 September 2010. Retrieved 5 September 2020.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.