ARM Technical Support Knowledge Articles

How to change the frequency of the RVI/DSTREAM sampling clock

Applies to: DSTREAM, RealView ICE and Trace (RVI / RVT)

Answer

When RVI/DSTREAM is configured in adaptive clocking mode, it uses a 50MHz internal clock to sample RTCK. RVI/DSTREAM toggles TCK when it detects a change in RTCK, which happens approximately 60ns after RTCK changes.

TDO is generated by a synthesizable ARM processor after the falling edge of RTCK, and is sampled by RVI/DSTREAM at the rising edge of TCK.

TCK and TDO changing after falling edge of RTCK

The figure shows how TDO and TCK change after the falling edge of RTCK. tTDO is the time from the falling edge of RTCK to the change in TDO, and it depends on the speed of the target. tTCK is the time from the falling edge of RTCK to the rising edge of TCK, and it depends on the RVI/DSTREAM internal sampling rate.

If the target is slow (tTDO long) and the RVI/DSTREAM internal sampling clock is fast (tTCK short), it is possible that RVI/DSTREAM cannot sample TDO correctly because the setup time of TDO before the rising edge of TCK is violated. This can be a problem when connecting to very slow targets such as hardware emulators. The only way to avoid this problem is to reduce the frequency of the RVI internal clock.

For RVI/DSTREAM, the frequency of the internal sampling clock is set at 50MHz by RV-Config. This information is written into the .rvc file every time the configuration is saved in RV-Config/DebugHardware Config. It is possible to change this frequency by manually editing the .rvc file before connecting to the target. The relevant lines are:

<?xml version="1.0"?>

<?RVConfigUtility MajorVersion = '0' MinorVersion = '0' PatchVersion =
'0'?>
<RVConfigUtility>
   <RVConfigModule>
.......
.......
         <DataList Type = 'Branch'>
            <DataListUID Type = 'User'>0x00000002</DataListUID>
            <ClockType Type = 'Int32'>0</ClockType>
            <ClockSpeed Type = 'Str'>50000000A</ClockSpeed>
            <OtherSpeed Type = 'Str'>10.000 MHz</OtherSpeed>
            <Tap_Count Type = 'UInt32'>3</Tap_Count>
........

For example, changing the line

            <ClockSpeed Type = 'Str'>50000000A</ClockSpeed>

into

            <ClockSpeed Type = 'Str'>100000A</ClockSpeed>  

sets the internal clock at 100KHz instead of 50MHz.

Attachments: img7031.gif

Article last edited on: 2011-11-02 14:46:02

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential