4.2.4. Configuring a scan chain

This section explains how to configure a scan chain for the currently connected RealView ICE unit. This procedure consists of the following steps:

  1. Displaying the scan chain controls

  2. Autoconfiguring a scan chain

  3. Adding devices

  4. Removing devices

  5. Changing the order of devices

  6. Changing the properties of a device

  7. Setting the clock speed.

Displaying the scan chain controls

Before you can configure a scan chain, you must ensure that the control pane displays the scan chain controls. To do this, select the Devices node in the tree diagram, as shown in Figure 4.8.

Figure 4.8. Displaying the scan chain controls

Displaying the scan chain controls

Autoconfiguring a scan chain

When autoconfiguring a scan chain, RealView ICE interrogates the scan chain and automatically selects the correct templates for supported ARM® target devices, and adds them to the scan chain in the correct order. This takes place at the current clock speed (see Setting the clock speed):

  • If you are using a fixed clock speed, but RealView ICE detects one or more devices that require adaptive clocking, it automatically selects adaptive clocking.

  • If you are using adaptive clocking, but RealView ICE does not detect any devices that support adaptive clocking, an error message is generated. Select a fixed clock speed.

  • If the clock speed is too high, some devices on the scan chain might not be detected. If you suspect that this is happening, decrease the clock speed.

Note

If your target cannot be autoconfigured (which is the case for many DSPs), you must add devices manually (see Adding devices).

Autoconfiguring identifies the target core by reading the JTAG TAPID register. The value of this register is usually set by the engineers that integrate the ARM core into a design. It is not set within the ARM core itself. For more information, see the ARM datasheet or technical reference manual for the core that you are integrating (see ARM publications).

Warning

Reading the JTAG TAPID register might not be sufficient for RealView ICE to uniquely identify the device. In these circumstances, auto-configuring might involve:

  • resetting the core or the board

  • stopping the core

  • accessing registers

  • accessing memory.

In extreme cases, these actions might cause physical damage to the system being debugged. If your system cannot tolerate this level of intrusion, you must instead add the device manually.

To auto-configure a scan chain:

  1. Ensure that the scan chain controls are displayed, as described in Displaying the scan chain controls.

  2. Click on Auto Configure. Each detected device is added to the scan chain configuration list in the control pane, and is also added to the tree diagram. In many cases, this is all that you have to do to configure the scan chain. You must then configure the devices themselves, as described in Configuring devices.

    If there are one or more devices on your scan chain, when you click on Auto Configure an Auto Configure Scan Chain dialog box displays, and you are prompted to confirm whether you want to proceed. See Figure 4.9.

    Figure 4.9. Auto Configure Scan Chain dialog box

    Auto Configure Scan Chain dialog box

    Caution

    If you click OK, all your devices are cleared from the scan chain configuration window.

You might see one of the following errors:

  • If RealView ICE detects any unpowered devices, it displays the error shown in Figure 4.10.

    Figure 4.10. Error shown when unpowered devices are detected

    Error shown when unpowered devices are detected

    This error message can also display if the target is connected by the JTAG ribbon cable if RealView ICE is started when the LVDS probe is connected, or if the probe is connected and used after you started RealView ICE.

    If you see this error:

    • Check the JTAG connection between the RealView ICE run control unit and the target hardware. See Connection instructions.

    • Ensure that power is supplied to all your devices.

  • If RealView ICE cannot identify any devices, it displays the error shown in Figure 4.11.

    Figure 4.11. Error shown when no devices are detected

    Error shown when no devices are detected

    If you see this error, try auto-configuring again with a lower clock speed. See Setting the clock speed.

    Note

    You might have to power-cycle your target hardware when changing the clock speed.

  • If communication cannot be made with the RealView ICE unit, it displays the error shown in Figure 4.12.

    Figure 4.12. Error shown when there is no communication with RealView ICE

    Error shown when there is no communication with RealView ICE

    If you see this error, then check the network or USB cable to the RealView ICE unit.

You can use the other controls in the RVConfig dialog box to create or modify the scan chain configuration. See:

Adding devices

You can manually add devices to the scan chain, if required. You might want to do this in the following circumstances:

  • You have previously autoconfigured the scan chain, and added extra devices to the scan chain. In this case, you might also have to change the order of the devices (see Changing the order of devices).

  • The autoconfiguration fails. This might occur if your target includes a DSP device.

    Note

    If your target does not have a DSP, check the connection between your RealView ICE and the target, make sure your target is switched on, and then attempt the autoconfiguration again.

To add a device:

  1. Ensure that the scan chain controls are displayed. See Displaying the scan chain controls.

  2. Click on Add.... The Add Device dialog box appears, as shown in Figure 4.13. Other devices might be available, depending on your RealView ICE firmware.

    Figure 4.13. The Add Device dialog box

    The Add Device dialog box

  3. If you have more than one device, check the order of the devices on the target. The device nearest to TDI is last on the chain.

    Note

    If you add the devices in the wrong order, you can later change the order (see Changing the order of devices).

  4. Specify the device to add:

    • If the device appears in the list of Registered Devices:

      1. Select Registered Devices.

      2. Expand the relevant category. To do this, either double-click on its name, or click on the associated + button. You can only select categories and devices that do not appear in light gray.

      3. Select the device that you want to add.

      4. Click on Add. The device is added to the scan chain.

        Note

        You can also add a device to the scan chain by double-clicking the device.

      5. If you have multiple devices, repeat steps 2 to 4 to add each registered device.

    • Otherwise:

      1. Select Custom Device.

      2. Enter the name of the device in the Device Name field. This is used as the name of the device node in the tree view, and can have any value.

      3. Enter the JTAG Instruction Register length (in bits) in the IR Length field.

        Note

        If you enter an incorrect value for the IR length, any connections that you attempt to make to the device result in failure.

      4. Click on Add. The device is added to the scan chain.

      5. If you have multiple devices, repeat steps 2 to 4 to add each custom device.

  5. When you have finished, click on Close.

Note

You can remove devices, or change their order in the scan chain, without first having to close the Add Device dialog box. For information on these procedures, see Removing devices, and Changing the order of devices.

Figure 4.14 shows a number of devices that have been added to the scan chain in a hierarchical manner. Hierarchies are created automatically when a device is added as a CoreSight component, and enables you to manage component interactions easily.

Figure 4.14. Scan chain devices with tooltip facility displayed

Scan chain devices with tooltip facility displayed

The scan chain shows a device’s unique association name, if one exists, to help you to indentify the correct device when you are creating associations.

When the cursor is placed over a device, a tooltip displays details relating to that device.

Note

The Associations item in the tooltip only appears if an association has been set up for that device. See CoreSight Association files.

Removing devices

To remove an unwanted device from the scan chain:

  1. Ensure that the scan chain controls are displayed. See Displaying the scan chain controls.

  2. Select the device in the scan chain configuration.

  3. Click Remove. If a device has a child component, you must confirm whether you want to proceed.

Changing the order of devices

The scan chain configuration shows the devices ordered in relation to RealView ICE TDI and TDO, as indicated by the arrows in the Devices pane of the RVConfig dialog box. See Figure 4.14.

Note

If you have previously used Multi-ICE®, be aware that the list of devices on the scan chain is the same order as that used by Multi-ICE. This, however, is not the case if you are using older versions of RealView ICE.

To change the position of a device in the scan chain:

  1. Ensure that the scan chain controls are displayed (see Displaying the scan chain controls).

  2. Select the device in the scan chain configuration.

  3. Then do one of the following:

    • click Move Left to move the device leftwards along the scan chain

    • click Move Right to move the device rightwards along the scan chain.

Note

The ordering of CoreSight devices on the same DAP is not important.

Changing the properties of a device

To change the properties of a device:

  1. Ensure that the scan chain controls are displayed (see Displaying the scan chain controls).

  2. Select the device in the scan chain configuration list.

  3. Click Properties.... The Device Properties dialog box appears, as shown in Figure 4.15.

    Figure 4.15. The Device Properties dialog box

    The Device Properties dialog box

    Note

    It is not possible to use an ETB without an ETM, so when you select ETB, ETM is selected automatically.

  4. Update the properties as necessary.

    • The Device Name field identifies the device that you are configuring.

    • The Template Version sets the version of the device template that you are using. The RealView ICE unit stores templates for each supported device. These templates define how to communicate with the device, and the configuration options for that device.

      RealView ICE can store multiple versions of templates for each device. One version is used by default (typically the most recent), but you can use the other versions if necessary. For example, you might use the latest version of a template to debug a new project, but use an older version to perform a regression test.

      For details of how to change the Default Version of a template, see Chapter 7 Managing the RealView ICE Software.

    • The Options area specifies whether or not certain features are present:

      • Embedded Trace Macrocell (ETM), when selected, indicates that the device has an ETM.

      • Embedded Trace Buffer (ETB), when selected, indicates that the device has an ETB.

      • Vector Floating Point (VFP), when selected, indicates that the device has a VFP unit.

      • Vector Floating Point v3 (VFPv3), when selected, indicates that the device has a VFPv3 unit.

      • Neon SIMD Extensions (Neon), when selected, indicates that the device has NEON® SIMD extensions.

  5. Click on OK.

Setting the clock speed

It is important to select the best clock speed for your system. Higher clock speeds enable faster downloads, but setting the clock speed too high can result in intermittent faults and reliability problems. If you are experiencing such problems, try reducing the clock speed. If you are not sure which clock speed to use, try setting the default speed, 10MHz.

Warning

The standard JTAG cable must not be used for clock speeds exceeding 20MHz. For reliable operation at high clock speeds, you must use the LVDS cable.

To set the clock speed:

  1. Ensure that the scan chain controls are displayed (see Displaying the scan chain controls).

  2. Specify the clocking that you want by using the Clock Speed controls, shown in Figure 4.16:

    Figure 4.16. The scan chain Speed controls

    The scan chain Speed controls

    • If you want to use fixed clocking, select the required speed. If the speed you want to use is not available as a preset:

      1. Enter the required speed with the Hz, kHz, or MHz suffix as required.

        Note

        Although RealView ICE can support JTAG clock speeds down to 13Hz, your debugging environment might become unstable at speeds lower than 1kHz.

      2. Press Enter.

    • If you want to use adaptive clocking, select Adaptive. You can use adaptive clocking if the target provides the RTCK (Returned TCK) signal. This enables you to synchronize the JTAG clock to the processor clock outside the core, and ensures that there are no synchronization problems over the JTAG interface.

      Note

      When using cores ending with -S, adaptive clocking does not have to be used, as long as TCK is set low enough relative to the core clock that is driving the JTAG synchronization logic.

      Note

      If you use adaptive clocking, the maximum clock frequency is lower than with non-adaptive clocking, because of transmission delays, gate delays, and synchronization requirements. Do not use adaptive clocking unless the hardware design requires it.

      For a full description of the concept of adaptive clocking, see Chapter 9 System Design Guidelines.

Copyright © 2002, 2004-2008 ARM Limited. All rights reserved.ARM DUI 0155J
Non-Confidential