Down load speed with JTAGKey

Dear all,

I am using a JTAGKey to down load to my development board.

The server is running on a Linux box (Fedora FC3).

I am using a locally compiled server as I need some modification for the

Non ARM core which I am using.

When downloading a large image (2MB) it takes about 1120 seconds

This is only 15kb/s.

The download is through the load_binary command in the telnet interface.

I have watched the JTAG operations and these come in bursts of aprox. 1ms

I assume this is the USB frame time which is limiting the transfer.

Is there some configuration setting which will increase the transfer block size over the USB?

Could this also be a problem with the old USB interface on the PC?

I assume this interface is running at 12Mb/s.

Thanks Dave

There are several settings that help increase the download speed:

  • The FT2232 driver used

At compile time, you have to select which FT2232 driver library to use, either FTDI’s proprietary FTD2XX or the open-source libftdi. FTD2XX offers a huge performance gain at the cost of being not completely free (it’s gratis, but not free software). Which driver were you using?

  • jtag_speed

This should be set to the lowest value that still allows proper communication. For a FT2232 based interface (like the JTAGkey), the resulting frequency is 6MHz / (1 + divisor). If your target (what is it?) is a -S core (e.g. ARM7TDMI-S), the JTAG frequency must be less than 1/6th of the current processor frequency. With a good board layout and a JTAG cable that isn’t too long (~10cm are usually best) you should be able to use “jtag_speed 0” on non “-S” cores.

  • arm7_9 fast_memory_access <‘enable’|‘disable’>

Fast memory access allows the OpenOCD to pretend that the target is always fast enough to catch up with memory accesses, reducing the number of readbacks from the target. This gives a huge speed increase but could result in communication failures if the target’s clock speed is less than the JTAG frequency. This should work fine, especially if you enable it after switching an on-chip PLL on.

  • arm7_9 dcc_downloads <‘enable’|‘disable’>

Together with fast_memory_access this offers the highest possible speed. It requires a “working_area” to be specified that is used to hold an on-chip algorithm for the DCC communication. For DCC operation, a few byte (24 or more) somewhere in your target’s RAM are enough. This location must NOT be written to with a load_binary operation and must not be modified with mw[bhw] commands. DCC operation requires a processor clock that is at least the same as the JTAG frequency.

Best regards,

Dominic

Dominic

We installed the FTD2XX driver following the instructions on the Amontec WEB site, setting the fstab entry to be usbfs (as we are using 2.6.11)

The config.h indicate that the FTD2XX driver is selected.

The usbview indicate JTAGKey is connected and shows no problems. The speed is 12Mb/s

Do I need to get a USB2.0 interface to achieve the higher speeds?

The jtag_speed and arm7_9 fast_memory_access commands donot make any significant difference

86k in 77s with fast_memory access disabled

86k in 74s with fast_memory_access enabled.

I have not looked at the DCC downloads, is there an example of setting it up/documentation?

Dave

Hello Dave,

you could enable the DEBUG_USB_IO macro in ft2232.c to measure the time the USB requests take to complete. Enabling fast_memory_access should cause the number of transactions to drop significantly (less calls to jtag_execute_queue).

As I don’t know your particular core nor the changes you’ve made to the OpenOCD I can’t tell you why you’re not seeing the expected speed increase.

I’ve read somewhere that using an USB 2.0 HUB on an USB 2.0 port increases FT2232 performance, but I haven’t observed that myself.

DCC downloads require a working_area to be specified:

working_area <target#> <‘backup’|‘nobackup’>

See http://openfacts.berlios.de/index-en.ph … figuration for an explanation of the parameters.

Best regards,

Dominic

@ tazzieboy,

… what is your target processor?

… what is your OpenCOD version?

The arm7_9 fast_memory_access <‘enable’|‘disable’> should provide a huge difference.

@ Dominic,

We have to think to add a new OpenOCD option allowing to add a RUNTEST in IDLE JTAG Tap State for x Clocks pulses when arm7_9 fast_memory_access enable. In this case we could wait/add a specific time between memory access. This will help to adjust and remove the communication failures. A bit specific, but this will really help.

Let me know!

Regards,

Laurent

http://www.amontec.com

@ Amontec, Dominic,

It would help if I read through all the code etc.

I have enabled the ddc_download and this increased the

load of the linux system (2.5MB) from 1120s to 34 seconds.

Our production people are ecstatic.

Thanks for all the help.

I hope to give more details of my work soon.

Dave

:smiley:

Dave,

Could you please let me know what is the processor you are working on.

my email is laurent dot gauch @ amontec dot com

Thank you in advance,

Laurent