AT91 DCC driver
Andrew Lunn
andrew@lunn.ch
Sat Jul 12 13:19:00 GMT 2008
Hi Folks
A couple of weekends ago i could not find the serial cable for my AT91
device. So i set too and wrote a DCC driver. DCC, or Debug
Communications Channel is part of the JTAG core of most ARM
processors. It allows the CPU to exchange bytes with the host over the
JTAG interface. Some JTAG devices make these bytes available via a TCP
socket which you can telnet to. So you end up with a virtual "serial"
port over the JTAG connector. This is useful when all your serial
ports are being used for connecting to peripherals, or as in my case,
you have lost the serial cable.
The code provides a HAL diag driver. It is not possible to use DCC as
a full interrupt driver serial device because there is no interrupt to
indicate a byte is available. You have to poll. But this fits the HAL
driver model well. The code has been tested on an AT91SAM7S but i
expect it to wok on all AT91SAM devices. I only tested output, ie
diag_printf(). There is code to also read from DCC, but i've not
tested.
The code is pretty generic. It should be very easy to port it to other
ARM devices which support DCC.
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: at91_dcc.patch
Type: text/x-diff
Size: 13897 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20080712/65ffa085/attachment.bin>
More information about the Ecos-patches
mailing list