Appendix D. The Host-Target Link

Table of Contents
D.1. How to Change the UART Speed
D.2. RS-232 Information

The host-target link allows the debugger to communicate with the debug monitor running on the target computer. The link uses an RS-232C interface connected to a serial port on the host computer, and connected to a compatible serial port on the target computer. On the Temic Starter Kit we use serial port A.

The connecting cable must include a null modem. This is because both serial ports are configured to operate a terminal. The null modem is simply a cross over that wires the outputs from one port to the inputs of the other. Details of the wiring are given in Section D.2.

D.1. How to Change the UART Speed

To change the speed of the two UARTs we must change the initial value of the UART scaler field in the system configuration register. This field occupies the most significant eight bits of register SYSCTR and its value is as follows. Note that we set ubr to 1 in all cases.

Table D-1. Pre-Computed Values for the UART Scaler (For ubr = 1)

Clock Frequency in MHzBits per Second
96001440019200288003840057600115200
5151074320
1032211510742
15483223151173
206442322115104
258053402619136
309764483223157

Because of rounding errors, the actual speed of the UART is usually different from the required speed. The following table gives the percentage error for each of the figures above.

Table D-2. Errors in bit rate (For ubr = 1)

Clock Frequency in MHzBits per Second
96001440019200288003840057600115200
52%-1%2%9%2%-10%36%
10-1%-1%2%-1%2%9%-10%
150%-1%2%2%2%2%2%
200%1%-1%-1%2%-1%9%
250%0%-1%0%2%-3%-3%
300%0%0%-1%2%2%2%