Main Page | Modules | File List | Globals | Related Pages

2 TAP State Handler

Handle TAP controller state changes according to IEEE 1149.1. More...

Defines

#define TEST_LOGIC_RESET   0x00
#define RUN_TEST_IDLE   0x01
#define SELECT_DR_SCAN   0x02
#define CAPTURE_DR   0x03
#define SHIFT_DR   0x04
#define EXIT1_DR   0x05
#define PAUSE_DR   0x06
#define EXIT2_DR   0x07
#define UPDATE_DR   0x08
#define SELECT_IR_SCAN   0x09
#define CAPTURE_IR   0x0A
#define SHIFT_IR   0x0B
#define EXIT1_IR   0x0C
#define PAUSE_IR   0x0D
#define EXIT2_IR   0x0E
#define UPDATE_IR   0x0F
#define UNKNOWN_STATE   0x10

Functions

void TapStateInit (void)
 TAP controller initialization.

void TmsHighTransition (void)
 State transition with TMS set to high.

void TmsLowTransition (void)
 State transition with TMS set to low.

int TapStateChange (u_char state)
 Change TAP state.

void TapStateInc (void)
 Increment the TAP state.


Variables

u_char tapState
 Current state of the TAP controller.


Detailed Description

Handle TAP controller state changes according to IEEE 1149.1.

The order of the defined TAP state codes is critical and should reflect the TAP state transistions.


Define Documentation

#define CAPTURE_DR   0x03
 

TAP state.

Definition at line 59 of file tapsm.h.

Referenced by TapStateChange().

#define CAPTURE_IR   0x0A
 

TAP state.

Definition at line 73 of file tapsm.h.

Referenced by TapStateChange().

#define EXIT1_DR   0x05
 

TAP state.

Definition at line 63 of file tapsm.h.

Referenced by TapStateChange().

#define EXIT1_IR   0x0C
 

TAP state.

Definition at line 77 of file tapsm.h.

Referenced by TapStateChange().

#define EXIT2_DR   0x07
 

TAP state.

Definition at line 67 of file tapsm.h.

Referenced by TapStateChange().

#define EXIT2_IR   0x0E
 

TAP state.

Definition at line 81 of file tapsm.h.

Referenced by TapStateChange().

#define PAUSE_DR   0x06
 

TAP state.

Definition at line 65 of file tapsm.h.

Referenced by Execute(), ReShift(), and TapStateChange().

#define PAUSE_IR   0x0D
 

TAP state.

Definition at line 79 of file tapsm.h.

Referenced by Execute(), and TapStateChange().

#define RUN_TEST_IDLE   0x01
 

TAP state.

Definition at line 55 of file tapsm.h.

Referenced by Execute(), ReShift(), and TapStateChange().

#define SELECT_DR_SCAN   0x02
 

TAP state.

Definition at line 57 of file tapsm.h.

Referenced by TapStateChange().

#define SELECT_IR_SCAN   0x09
 

TAP state.

Definition at line 71 of file tapsm.h.

Referenced by TapStateChange().

#define SHIFT_DR   0x04
 

TAP state.

Definition at line 61 of file tapsm.h.

Referenced by Execute(), ReShift(), and TapStateChange().

#define SHIFT_IR   0x0B
 

TAP state.

Definition at line 75 of file tapsm.h.

Referenced by Execute(), and TapStateChange().

#define TEST_LOGIC_RESET   0x00
 

TAP state.

Definition at line 53 of file tapsm.h.

Referenced by Execute(), TapStateChange(), and TapStateInit().

#define UNKNOWN_STATE   0x10
 

Unknown TAP state, indicates an error.

Definition at line 85 of file tapsm.h.

Referenced by XsvfGetState().

#define UPDATE_DR   0x08
 

TAP state.

Definition at line 69 of file tapsm.h.

Referenced by TapStateChange().

#define UPDATE_IR   0x0F
 

TAP state.

Definition at line 83 of file tapsm.h.

Referenced by TapStateChange().


Function Documentation

int TapStateChange u_char  state  ) 
 

Change TAP state.

Moves the TAP (Test Access Port) controller of the target to the specified state.

Trying to enter Exit2-DR or Exit2-IR from any other state except Pause-DR or Pause-IR resp. will result in an error.

Parameters:
state Requested TAP controller state.
Returns:
Zero on success, otherwise an error code is returned.

Definition at line 106 of file tapsm.c.

References CAPTURE_DR, CAPTURE_IR, EXIT1_DR, EXIT1_IR, EXIT2_DR, EXIT2_IR, PAUSE_DR, PAUSE_IR, RUN_TEST_IDLE, SELECT_DR_SCAN, SELECT_IR_SCAN, SHIFT_DR, SHIFT_IR, tapState, TEST_LOGIC_RESET, TmsHighTransition(), TmsLowTransition(), UPDATE_DR, UPDATE_IR, and XE_ILLEGALSTATE.

Referenced by Execute(), and ReShift().

void TapStateInc void   ) 
 

Increment the TAP state.

This routine will be used by the caller to update the current TAP state, if the last shift included a state transition.

Definition at line 273 of file tapsm.c.

References tapState.

Referenced by ReShift().

void TapStateInit void   ) 
 

TAP controller initialization.

Must be called prior any other routine in this module.

Definition at line 66 of file tapsm.c.

References SET_TMS, tapState, and TEST_LOGIC_RESET.

Referenced by Execute().


© 2004 by egnite Software GmbH - visit http://www.ethernut.de/