OpenOCD
msgtypes.h File Reference

Definition of the commands supported by the OpenULINK firmware. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CMD_CLOCK_TCK   0x22
 
#define CMD_CLOCK_TMS   0x20
 
#define CMD_CONFIGURE_TCK_FREQ   0x28
 
#define CMD_GET_SIGNALS   0x26
 
#define CMD_ID_MASK   0x3F
 
#define CMD_SCAN_IN   0x00
 
#define CMD_SCAN_IO   0x04
 
#define CMD_SCAN_OUT   0x02
 
#define CMD_SET_LEDS   0x29
 
#define CMD_SET_SIGNALS   0x27
 
#define CMD_SLEEP_MS   0x25
 
#define CMD_SLEEP_US   0x24
 
#define CMD_SLOW_CLOCK_TCK   0x23
 
#define CMD_SLOW_CLOCK_TMS   0x21
 
#define CMD_SLOW_SCAN_IN   0x01
 
#define CMD_SLOW_SCAN_IO   0x05
 
#define CMD_SLOW_SCAN_OUT   0x03
 
#define CMD_TEST   0x2A
 
#define COM_LED_OFF   (1<<2)
 
#define COM_LED_ON   (1<<0)
 
#define RUN_LED_OFF   (1<<3)
 
#define RUN_LED_ON   (1<<1)
 
#define SIGNAL_BRKIN   (1<<4)
 
#define SIGNAL_BRKOUT   (1<<1)
 
#define SIGNAL_OCDSE   (1<<6)
 
#define SIGNAL_RESET   (1<<5)
 
#define SIGNAL_RTCK   (1<<3)
 
#define SIGNAL_TCK   (1<<2)
 
#define SIGNAL_TDI   (1<<0)
 
#define SIGNAL_TDO   (1<<0)
 
#define SIGNAL_TMS   (1<<1)
 
#define SIGNAL_TRAP   (1<<2)
 
#define SIGNAL_TRST   (1<<3)
 

Detailed Description

Definition of the commands supported by the OpenULINK firmware.

Basically, two types of commands can be distinguished:

  • Commands with fixed payload size
  • Commands with variable payload size

SCAN commands (in all variations) carry payloads of variable size, all other commands carry payloads of fixed size.

In the case of SCAN commands, the payload size (n) is calculated by dividing the scan_size_bits variable by 8, rounding up the result.

Offset zero always contains the command ID.

CMD_SCAN_IN, CMD_SLOW_SCAN_IN: *

  • OUT: * offset 1: scan_size_bytes * offset 2: bits_last_byte * offset 3: tms_count_start + tms_count_end * offset 4: tms_sequence_start * offset 5: tms_sequence_end *
  • IN: * offset 0..n: TDO data *

CMD_SCAN_OUT, CMD_SLOW_SCAN_OUT: *

  • OUT: * offset 1: scan_size_bytes * offset 2: bits_last_byte * offset 3: tms_count_start + tms_count_end * offset 4: tms_sequence_start * offset 5: tms_sequence_end * offset 6..x: TDI data *

CMD_SCAN_IO, CMD_SLOW_SCAN_IO: *

  • OUT: * offset 1: scan_size_bytes * offset 2: bits_last_byte * offset 3: tms_count_start + tms_count_end * offset 4: tms_sequence_start * offset 5: tms_sequence_end * offset 6..x: TDI data *
  • IN: * offset 0..n: TDO data *

CMD_CLOCK_TMS, CMD_SLOW_CLOCK_TMS: *

  • OUT: * offset 1: tms_count * offset 2: tms_sequence *

CMD_CLOCK_TCK, CMD_SLOW_CLOCK_TCK: *

  • OUT: * offset 1: low byte of tck_count * offset 2: high byte of tck_count *

CMD_CLOCK_SLEEP_US: *

  • OUT: * offset 1: low byte of sleep_us * offset 2: high byte of sleep_us *

CMD_CLOCK_SLEEP_MS: *

  • OUT: * offset 1: low byte of sleep_ms * offset 2: high byte of sleep_ms *

CMD_GET_SIGNALS: *

  • IN: * offset 0: current state of input signals * offset 1: current state of output signals *

CMD_SET_SIGNALS: *

  • OUT: * offset 1: signals that should be de-asserted * offset 2: signals that should be asserted *

CMD_CONFIGURE_TCK_FREQ: *

  • OUT: * offset 1: delay value for scan_in function * offset 2: delay value for scan_out function * offset 3: delay value for scan_io function * offset 4: delay value for clock_tck function * offset 5: delay value for clock_tms function *

CMD_SET_LEDS: *

  • OUT: * offset 1: LED states: * Bit 0: turn COM LED on * Bit 1: turn RUN LED on * Bit 2: turn COM LED off * Bit 3: turn RUN LED off * Bits 7..4: Reserved *

CMD_TEST: *

  • OUT: * offset 1: unused dummy value *

Definition in file msgtypes.h.

Macro Definition Documentation

◆ CMD_CLOCK_TCK

#define CMD_CLOCK_TCK   0x22

Definition at line 147 of file msgtypes.h.

◆ CMD_CLOCK_TMS

#define CMD_CLOCK_TMS   0x20

Definition at line 145 of file msgtypes.h.

◆ CMD_CONFIGURE_TCK_FREQ

#define CMD_CONFIGURE_TCK_FREQ   0x28

Definition at line 153 of file msgtypes.h.

◆ CMD_GET_SIGNALS

#define CMD_GET_SIGNALS   0x26

Definition at line 151 of file msgtypes.h.

◆ CMD_ID_MASK

#define CMD_ID_MASK   0x3F

Definition at line 134 of file msgtypes.h.

◆ CMD_SCAN_IN

#define CMD_SCAN_IN   0x00

Definition at line 137 of file msgtypes.h.

◆ CMD_SCAN_IO

#define CMD_SCAN_IO   0x04

Definition at line 141 of file msgtypes.h.

◆ CMD_SCAN_OUT

#define CMD_SCAN_OUT   0x02

Definition at line 139 of file msgtypes.h.

◆ CMD_SET_LEDS

#define CMD_SET_LEDS   0x29

Definition at line 154 of file msgtypes.h.

◆ CMD_SET_SIGNALS

#define CMD_SET_SIGNALS   0x27

Definition at line 152 of file msgtypes.h.

◆ CMD_SLEEP_MS

#define CMD_SLEEP_MS   0x25

Definition at line 150 of file msgtypes.h.

◆ CMD_SLEEP_US

#define CMD_SLEEP_US   0x24

Definition at line 149 of file msgtypes.h.

◆ CMD_SLOW_CLOCK_TCK

#define CMD_SLOW_CLOCK_TCK   0x23

Definition at line 148 of file msgtypes.h.

◆ CMD_SLOW_CLOCK_TMS

#define CMD_SLOW_CLOCK_TMS   0x21

Definition at line 146 of file msgtypes.h.

◆ CMD_SLOW_SCAN_IN

#define CMD_SLOW_SCAN_IN   0x01

Definition at line 138 of file msgtypes.h.

◆ CMD_SLOW_SCAN_IO

#define CMD_SLOW_SCAN_IO   0x05

Definition at line 142 of file msgtypes.h.

◆ CMD_SLOW_SCAN_OUT

#define CMD_SLOW_SCAN_OUT   0x03

Definition at line 140 of file msgtypes.h.

◆ CMD_TEST

#define CMD_TEST   0x2A

Definition at line 155 of file msgtypes.h.

◆ COM_LED_OFF

#define COM_LED_OFF   (1<<2)

Definition at line 175 of file msgtypes.h.

◆ COM_LED_ON

#define COM_LED_ON   (1<<0)

Definition at line 173 of file msgtypes.h.

◆ RUN_LED_OFF

#define RUN_LED_OFF   (1<<3)

Definition at line 176 of file msgtypes.h.

◆ RUN_LED_ON

#define RUN_LED_ON   (1<<1)

Definition at line 174 of file msgtypes.h.

◆ SIGNAL_BRKIN

#define SIGNAL_BRKIN   (1<<4)

Definition at line 168 of file msgtypes.h.

◆ SIGNAL_BRKOUT

#define SIGNAL_BRKOUT   (1<<1)

Definition at line 159 of file msgtypes.h.

◆ SIGNAL_OCDSE

#define SIGNAL_OCDSE   (1<<6)

Definition at line 170 of file msgtypes.h.

◆ SIGNAL_RESET

#define SIGNAL_RESET   (1<<5)

Definition at line 169 of file msgtypes.h.

◆ SIGNAL_RTCK

#define SIGNAL_RTCK   (1<<3)

Definition at line 161 of file msgtypes.h.

◆ SIGNAL_TCK

#define SIGNAL_TCK   (1<<2)

Definition at line 166 of file msgtypes.h.

◆ SIGNAL_TDI

#define SIGNAL_TDI   (1<<0)

Definition at line 164 of file msgtypes.h.

◆ SIGNAL_TDO

#define SIGNAL_TDO   (1<<0)

Definition at line 158 of file msgtypes.h.

◆ SIGNAL_TMS

#define SIGNAL_TMS   (1<<1)

Definition at line 165 of file msgtypes.h.

◆ SIGNAL_TRAP

#define SIGNAL_TRAP   (1<<2)

Definition at line 160 of file msgtypes.h.

◆ SIGNAL_TRST

#define SIGNAL_TRST   (1<<3)

Definition at line 167 of file msgtypes.h.