Segger SAM-ICE USB Commands
The Segger SAM-ICE is a faster JTAG interface than the simple parallel port wiggler interface. The higher speed would be especially interesting for flashing. I have one of those as I got it in a bundle with the AT91SAM7S-EK, it costs about 100 to 150 Euro. Currently I can only use it with the MS-Windows application jlink.exe, but I would like to use it under Linux together with GDB, for example with JTAG-GDB Server for ARM.
The SAM-ICE is connected via USB, the protocol for using JTAG looks relatively straightforward and simple. The command to the SAM-ICE for a JTAG sequence is
0xcd <length in bits, lsb> <length in bits, msb> <TMS data, bit 0 goes first> <TDI data, bit 0 goes first>and the SAM-ICE replies with
<TDO data, bit 0 goes first>The length seems to always be a multiple of 8. When data or instructions are shifted, the first bit is at the position of the second Shift state, the last at the Exit1 state. Here is some example data:
cd f0 01 c3 c1 e3 00 00 00 00 80 0d 07 8f 03 00 00 00 00 06 30 1c 3c 0e 00 00 00 00 d8 70 f0 38 00 00 00 00 60 c3 c1 e3 00 00 00 00 80 01 0c 07 8f 03 00 00 00 00 06 30 1c 3c 0e 38 00 00 00 80 01 10 10 30 00 00 00 00 80 40 40 c0 00 00 00 00 c0 02 00 01 01 c3 ff ff ff 7f 0a 04 04 0c ff ff ff ff 2b 10 10 30 dc 03 00 00 b4 00 40 40 c0 00 10 00 00 c0 02 00 01 01 43 00 01 00 00 00 00Reply:
9f c7 df 03 01 00 00 00 7f 1e 7f 0f 00 00 00 00 fe ff 79 fc 3d 00 00 00 00 fb e7 f1 f7 ff ff ff ff e9 9f c7 df ff ff ff ff af ff 7f 1e 7f 7f 0f 00 00 d0 fe ff 79 fc 3d f0 19 00 00 00 ffThere are other commands, for example for measuring target voltage. More about that later.
![[js logo]](/svg/jslogo32.png)