<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Background_debug_mode_interface</id>
	<title>Background debug mode interface - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Background_debug_mode_interface"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Background_debug_mode_interface&amp;action=history"/>
	<updated>2026-05-05T21:15:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Background_debug_mode_interface&amp;diff=3699139&amp;oldid=prev</id>
		<title>imported&gt;GreenC bot: Rescued 3 archive links; reformat 3 links. Wayback Medic 2.5 per :Category:All articles with dead external links - pass 3</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Background_debug_mode_interface&amp;diff=3699139&amp;oldid=prev"/>
		<updated>2025-01-21T03:26:47Z</updated>

		<summary type="html">&lt;p&gt;Rescued 3 archive links; reformat 3 links. &lt;a href=&quot;/wiki143/index.php?title=User:GreenC/WaybackMedic_2.5&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:GreenC/WaybackMedic 2.5 (page does not exist)&quot;&gt;Wayback Medic 2.5&lt;/a&gt; per &lt;a href=&quot;/wiki143/index.php?title=Category:All_articles_with_dead_external_links&quot; title=&quot;Category:All articles with dead external links&quot;&gt;Category:All articles with dead external links&lt;/a&gt; - pass 3&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Use American English|date = March 2019}}&lt;br /&gt;
{{Short description|Debugging interface for embedded systems}}&lt;br /&gt;
{{Use mdy dates|date = March 2019}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Background debug mode&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;BDM&amp;#039;&amp;#039;&amp;#039;) interface is an electronic interface that allows [[debugging]] of [[embedded system]]s. Specifically, it provides [[in-circuit emulator|in-circuit debugging]] functionality in microcontrollers. It requires a single wire and specialized electronics in the system being debugged. It appears in many [[Freescale Semiconductor]] products. Background commands are categorized into two types: Non-intrusive commands and Active background commands. Non-intrusive commands can be issued while the user program is running, which include memory access commands.&amp;lt;ref&amp;gt;{{Cite web |url=https://www.datasheetarchive.com/datasheet?id=a84bd5f4cb577c604e833c56c460f32672f7e4&amp;amp;type=M&amp;amp;term=hcs08rmv1 |title=HCS08 Family Reference Manual |pages=34-35 |accessdate=2024-02-06}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The interface allows a &amp;#039;&amp;#039;Host&amp;#039;&amp;#039; to manage and query a &amp;#039;&amp;#039;target&amp;#039;&amp;#039;. Specialized hardware is required in the target device. No special hardware is required in the host; a simple bidirectional [[I/O port|I/O pin]] is sufficient.&lt;br /&gt;
&lt;br /&gt;
== I/O signals ==&lt;br /&gt;
&lt;br /&gt;
The signals used by BDM to communicate data to and from the target are initiated by the host processor. The host negates the transmission line, and then either&lt;br /&gt;
&lt;br /&gt;
* [[wiktionary:asserts|Asserts]] the line sooner, to output a 1,&lt;br /&gt;
* Asserts the line later, to output a 0,&lt;br /&gt;
* [[Three-state logic|Tri-states]] its output, allowing the target to drive the line. The host can sense a 1 or 0 as an input value.&lt;br /&gt;
&lt;br /&gt;
At the start of the next bit time, the host negates the transmission line, and the process repeats. Each bit is communicated in this manner.&lt;br /&gt;
&lt;br /&gt;
In other words, the increasing complexity of today&amp;#039;s software and hardware designs is leading to some fresh approaches to debugging. &amp;#039;&amp;#039;Silicon manufacturers offer more and more on-chip debugging features for emulation of new processors&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This capability, implemented in various processors under such names as background debug mode (BDM), [[JTAG]] and on-chip [[In-circuit emulator|in-circuit emulation]], puts basic debugging functions on the chip itself. With a BDM (1 wire interface) or JTAG (standard JTAG) [[debug port]], you control and monitor the microcontroller solely through the stable on-chip debugging services.&lt;br /&gt;
&lt;br /&gt;
This debugging mode runs even when the target system crashes and enables developers to continue investigating the cause of the crash.&lt;br /&gt;
&lt;br /&gt;
==Microcontroller application development==&lt;br /&gt;
&lt;br /&gt;
A good development tool environment is important to reduce total development time and cost. Users want to debug their application program under conditions that imitate the actual setup of their system. Because of that, the capability to debug a user program in an actual target system is required. This is known as [[in-circuit emulator|in-circuit debugging]]. Furthermore, most new MCUs have nonvolatile memory such as [[flash memory]] so that programming code on the target system is also required. This is known as [[In-system programming|in-circuit programming]].&lt;br /&gt;
&lt;br /&gt;
To support in-circuit debugging and programming requirements, the [[HC08]] Family has the monitor mode and the HCS08 and RS08 utilize a background debug mode (BDM). The background debug hardware on the HCS08 consists of a background debug controller (BDC) and debug module (DBG). The background debug hardware on the RS08 consists of the background debug controller (BDC) only.&lt;br /&gt;
&lt;br /&gt;
== BDM commands ==&lt;br /&gt;
&lt;br /&gt;
The BDM host can issue commands with parameters to the target. Some commands allow reading or writing of blocks of the target&amp;#039;s memory, individual registers in the CPU, or registers not available to the target.&lt;br /&gt;
&lt;br /&gt;
Examples include:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ BDM commands&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;READ_BYTE&amp;lt;/code&amp;gt; || Read a byte from memory &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WRITE_BYTE&amp;lt;/code&amp;gt; || Write a byte to memory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GO&amp;lt;/code&amp;gt; || Start/resume executing at current program counter location&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WRITE_PC&amp;lt;/code&amp;gt; || Write a value to the program counter&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;READ_PC&amp;lt;/code&amp;gt; || Read the value of the program counter&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WRITE_X&amp;lt;/code&amp;gt; || Write a value to the index register&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;READ_X&amp;lt;/code&amp;gt; || Read the value of the index register&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;READ_SP&amp;lt;/code&amp;gt; || Read the value of the stack pointer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== BDM functions ==&lt;br /&gt;
Depending on the target part, the BDM controller may feature a hardware [[breakpoint]] register. The register holds a value indicating an [[memory address|address]] in memory. When the target part&amp;#039;s CPU accesses that location in memory, the BDM hardware can take control of the target part, stop program execution, and begin operating in background mode.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* Freescale Semiconductor Inc. [https://www.nxp.com/docs/en/data-sheet/MC9RS08KA2.pdf MC9RS08KA2 Data Sheet (MC9RS08KA2, Rev. 4.0)]&lt;br /&gt;
* Freescale Semiconductor Inc. [https://web.archive.org/web/20051022211235/http://www.freescale.com/files/microcontrollers/doc/ref_manual/CPU12RM.pdf CPU12 Reference Manual]&lt;br /&gt;
* Freescale Semiconductor Inc. [https://hibp.ecse.rpi.edu/courses/CStudio/hc12/CPU12RM.pdf CPU12 Reference Manual]&lt;br /&gt;
* Freescale Semiconductor Inc. [https://web.archive.org/web/20140309095025/http://cache.freescale.com/files/microcontrollers/doc/ref_manual/RS08RM.pdf RS08 Core Reference Manual]&lt;br /&gt;
* Freescale Semiconductor Inc. [https://www.nxp.com/docs/en/reference-manual/RS08RM.pdf RS08 Core Reference Manual]&lt;br /&gt;
* Freescale Semiconductor Inc. [https://web.archive.org/web/20120312074607/http://cache.freescale.com/files/microcontrollers/doc/ref_manual/HCS08RMV1.pdf HCS08 Family Reference Manual]&lt;br /&gt;
* Freescale Semiconductor Inc. [https://www.datasheetarchive.com/datasheet?id=a84bd5f4cb577c604e833c56c460f32672f7e4&amp;amp;type=M&amp;amp;term=hcs08rmv1 HCS08 Family Reference Manual]&lt;br /&gt;
&lt;br /&gt;
[[Category:Embedded systems]]&lt;/div&gt;</summary>
		<author><name>imported&gt;GreenC bot</name></author>
	</entry>
</feed>