SET_BROKEN_CHAIN_DETECTION

The SET_BROKEN_CHAIN_DETECTION function is used to enable and disable broken chain detection in raw JTAG blocks.

By default detection is disabled when entering a raw JTAG block and is always enabled again when leaving. Note that Raw JTAG blocks may be nested, and detection will only be automatically changed when entering and leaving the outermost block.

When broken chain detection is enabled, reading data using a DR statement will give an error ("The JTAG chain appears to be broken") if the chains break. With it disabled, there will be no error produced but data returned from the DR statement may not be what would be expected if the chains were functioning.

Disabling broken chain detection in Raw JTAG is the default behaviour because it can be very useful - often Raw JTAG is used while setting up JTAG chains, for example in a Test Reset sequence, and at the time a chain is scanned it may not be fully functioning, although the user may know, for example, that the bits they wish to read are going to be present in the returned data. Being able to disable the broken chain detection allows the user to access the data that is returned even when the chain is broken.

However, if the JTAG chains should be functional then enabling broken chain detection will allow reporting of any problems on the device under test from inside the Raw JTAG block.

Syntax

SET_BROKEN_CHAIN_DETECTION( INT enable )

Parameters

enable
A boolean value indicating whether detection should be enabled or not.

Errors

It is a compile error to use SET_BROKEN_CHAIN_DETECTION outside of a raw JTAG block.

Example

JTAG
  IF DEBUG = 0 THEN
    SET_BROKEN_CHAIN_DETECTION(TRUE);
  END;
  ...
END;