| |||
Home > Configuring a RealView ICE Connection > Using the RVConfig dialog box > 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:
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.
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.
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).
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:
Ensure that the scan chain controls are displayed, as described in Displaying the scan chain controls.
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.
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.
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.
If you see this error, try auto-configuring again with a lower clock speed. See Setting the clock speed.
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.
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:
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.
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:
Ensure that the scan chain controls are displayed. See Displaying the scan chain controls.
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.
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.
If you add the devices in the wrong order, you can later change the order (see Changing the order of devices).
Specify the device to add:
If the device appears in the list of Registered Devices:
Select Registered Devices.
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.
Select the device that you want to add.
Click on Add. The device is added to the scan chain.
You can also add a device to the scan chain by double-clicking the device.
If you have multiple devices, repeat steps 2 to 4 to add each registered device.
Otherwise:
Select Custom Device.
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.
Enter the JTAG Instruction Register length (in bits) in the IR Length field.
If you enter an incorrect value for the IR length, any connections that you attempt to make to the device result in failure.
Click on Add. The device is added to the scan chain.
If you have multiple devices, repeat steps 2 to 4 to add each custom device.
When you have finished, click on Close.
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.
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.
The Associations item in the tooltip only appears if an association has been set up for that device. See CoreSight Association files.
To remove an unwanted device from the scan chain:
Ensure that the scan chain controls are displayed. See Displaying the scan chain controls.
Select the device in the scan chain configuration.
Click Remove. If a device has a child component, you must confirm whether you want to proceed.
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.
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:
Ensure that the scan chain controls are displayed (see Displaying the scan chain controls).
Select the device in the scan chain configuration.
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.
The ordering of CoreSight devices on the same DAP is not important.
To change the properties of a device:
Ensure that the scan chain controls are displayed (see Displaying the scan chain controls).
Select the device in the scan chain configuration list.
Click Properties.... The Device Properties dialog box appears, as shown in Figure 4.15.
It is not possible to use an ETB without an ETM, so when you select ETB, ETM is selected automatically.
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.
Click on OK.
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.
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:
Ensure that the scan chain controls are displayed (see Displaying the scan chain controls).
Specify the clocking that you want by using the Clock Speed controls, shown in Figure 4.16:
If you want to use fixed clocking, select the required speed. If the speed you want to use is not available as a preset:
Enter the required speed with the Hz, kHz, or MHz suffix as required.
Although RealView ICE can support JTAG clock speeds down to 13Hz, your debugging environment might become unstable at speeds lower than 1kHz.
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.
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.
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.