14 #ifndef OPENOCD_JTAG_INTERFACE_H
15 #define OPENOCD_JTAG_INTERFACE_H
49 #define tap_set_state(new_state) \
51 LOG_DEBUG_IO("tap_set_state(%s)", tap_state_name(new_state)); \
52 tap_set_state_impl(new_state); \
160 const void *tdi_buf,
unsigned tap_len,
tap_state_t start_tap_state)
169 return start_tap_state;
189 #define DEBUG_CAP_TMS_SEQ (1 << 0)
327 uint32_t port_size,
unsigned int *trace_freq,
328 unsigned int traceclkin_freq, uint16_t *prescaler);
363 uint32_t port_size,
unsigned int *trace_freq,
364 unsigned int traceclkin_freq, uint16_t *prescaler);
tap_state_t jtag_debug_state_machine_(const void *tms_buf, const void *tdi_buf, unsigned tap_bits, tap_state_t next_state)
tap_state_t tap_state_transition(tap_state_t current_state, bool tms)
Function tap_state_transition takes a current TAP state and returns the next state according to the t...
static tap_state_t jtag_debug_state_machine(const void *tms_buf, const void *tdi_buf, unsigned tap_len, tap_state_t start_tap_state)
Prints verbose TAP state transitions for the given TMS/TDI buffers.
bool tap_is_state_stable(tap_state_t astate)
Function tap_is_state_stable returns true if the astate is stable.
const char *const jtag_only[]
int adapter_resets(int assert_trst, int assert_srst)
void tap_set_end_state(tap_state_t new_end_state)
This function sets the state of an "end state follower" which tracks the state that any cable driver ...
void tap_use_new_tms_table(bool use_new)
Allow switching between old and new TMS tables.
tap_state_t tap_get_end_state(void)
For more information,.
bool tap_uses_new_tms_table(void)
int tap_get_tms_path(tap_state_t from, tap_state_t to)
This function provides a "bit sequence" indicating what has to be done with TMS during a sequence of ...
int tap_get_tms_path_len(tap_state_t from, tap_state_t to)
Function int tap_get_tms_path_len returns the total number of bits that represents a TMS path transit...
int adapter_config_trace(bool enabled, enum tpiu_pin_protocol pin_protocol, uint32_t port_size, unsigned int *trace_freq, unsigned int traceclkin_freq, uint16_t *prescaler)
int adapter_poll_trace(uint8_t *buf, size_t *size)
int tap_move_ndx(tap_state_t astate)
Function tap_move_ndx when given a stable state, returns an index from 0-5.
void tap_set_state_impl(tap_state_t new_state)
implementation of wrapper function tap_set_state()
int adapter_deassert_reset(void)
tap_state_t tap_get_state(void)
This function gets the state of the "state follower" which tracks the state of the TAPs connected to ...
int adapter_assert_reset(void)
The JTAG interface can be implemented with a software or hardware fifo.
enum tap_state tap_state_t
Defines JTAG Test Access Port states.
#define LOG_LEVEL_IS(FOO)
size_t size
Size of the control block search area.
Represents a driver for a debugging interface.
struct jtag_interface * jtag_ops
Low-level JTAG APIs.
int(* config_trace)(bool enabled, enum tpiu_pin_protocol pin_protocol, uint32_t port_size, unsigned int *trace_freq, unsigned int traceclkin_freq, uint16_t *prescaler)
Configure trace parameters for the adapter.
int(* speed)(int speed)
Set the interface speed.
const struct swim_driver * swim_ops
int(* khz)(int khz, int *jtag_speed)
Returns JTAG maximum speed for KHz.
const struct command_registration * commands
The interface driver may register additional commands to expose additional features not covered by th...
int(* speed_div)(int speed, int *khz)
Calculate the clock frequency (in KHz) for the given speed.
int(* init)(void)
Interface driver must initialize any resources and connect to a JTAG device.
const struct swd_driver * swd_ops
Low-level SWD APIs.
int(* reset)(int srst, int trst)
Control (assert/deassert) the signals SRST and TRST on the interface.
const struct dap_ops * dap_swd_ops
int(* power_dropout)(int *power_dropout)
Read and clear the power dropout flag.
const char *const * transports
transports supported in C code (NULL terminated vector)
const struct dap_ops * dap_jtag_ops
int(* poll_trace)(uint8_t *buf, size_t *size)
Poll for new trace data.
int(* srst_asserted)(int *srst_asserted)
Read and clear the srst asserted detection flag.
const char *const name
The name of the interface driver.
int(* quit)(void)
Interface driver must tear down all resources and disconnect from the JTAG device.
Transport-neutral representation of queued DAP transactions, supporting both JTAG and SWD transports.
Represents a driver for a debugging interface.
unsigned supported
Bit vector listing capabilities exposed by this driver.
int(* execute_queue)(void)
Execute queued commands.
This file implements support for STMicroelectronics debug protocol SWIM (Single Wire Interface Module...