Problems downloading from IAR workbench with USB connection

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Problems downloading from IAR workbench with USB connection

    Hello All

    I regularly have unreliable downloads of code to my AT91SAM7S256 board, when using the J-Link via a USB connection, but very rarely (never) when used via Seggers TCP-IP server app.

    I download from IAR workbench v4.42a,

    The reported error is USB communication timed out: Requested 256 bytes, received 0 bytes !

    Debug log shows:

    Mon Feb 04 11:26:49 2008: Download : page 153
    Mon Feb 04 11:31:04 2008: USB communication timed out: Requested 256 bytes, received 0 bytes !
    Mon Feb 04 11:31:06 2008: Invalid file handle 0
    Mon Feb 04 11:31:06 2008: Non-zero or missing exit code.
    Mon Feb 04 11:31:07 2008: Code still contains old breakpoints

    Jlink.exe reports:

    J-Link>usb 1
    Connecting to J-Link via USB (Port: 1)
    DLL version V3.78d, compiled Jan 16 2008 19:55:31
    Firmware: J-Link compiled Dec 03 2007 17:15:31 ARM Rev.5
    Hardware: V5.30
    S/N : 5291
    OEM : IAR
    Info: TotalIRLen = 4, IRPrint = 0x01
    VTarget = 3.261V
    Info: TotalIRLen = 4, IRPrint = 0x01
    JTAG speed: 30 kHz
    Found 1 JTAG device, Total IRLen = 4:
    Id of device #0: 0x3F0F0F0F
    Found ARM with core Id 0x3F0F0F0F (ARM7)

    Any suggestions to improve the reliability of download?


    Mike Newsome, Hitek Power Ltd, England
  • Same here...


    I have the exact same issue. You wouldn't happen to be running Windows XP x64 edition? The same setup works perfectly on my laptop. The only difference is the laptop run the 32bit edition of XP instead of the 64.

    Glenn Heard
    Software Engineer
    Altronic Inc.
  • Windows XP Professional

    Hi Glenn - at least its not just me!

    I have windows XP Professional v2002 SP2, patched (probably too much) on a Dell Inspiron 9300 (laptop), 2.26G Pentium M and 1G RAM.

    However my colleague also has the same problem also on XP Pro, on a Dell Latitude D810.

    I still don't know where to go with this.
  • Ahh yes the old can't download cuz it times out and doesn't always tell you that it has....
    I've returned J-Links to IAR, been to our local distributer to ensure they were taking action with IAR, upgraded the Workbench etc etc... Why wont it work with my SAM7X256???
    My boss doesn't have the issues on his laptop, other than the download speed, but myself and the other developer rarely managed to use IAR to flash the unit more than once a day, then it would halt and not notify me -- arrggghhh!!!!
    In the end we paid the $$ for the Segger JFlash ARM tool and haven't looked back - flashes the unit (full 256kb) in 10secs compared to the minutes IAR would take. Just set it up to create a binary file and tell Jflash what to do at command line via a bat file. Then debug it will making sure it only verifies the code. No more wasted time and never a failed download.
    At one point IAR said that there was a hardware fault with the USB J-Link unit that I had and upgraded to a newer version but it made no difference to the reliability of IARs Workbench to programme the chip... And for the price of the development suite it is pretty poor. We never had this issue with IARs MSP430 development suite.
    And don't get me started on the Atmel Datasheets.

    Edit:: Update - there is a thread on this site talking about optimising the IAR flash loader for the Sam7S processor - I applied the same principles to the SAM7X flashloader in the examples directory and have increased the download time/reliability in doing so (about 1-2 mins for the 512kb chip we have here - flashing the whole size too). It occasionally locks up now but nowhere near as frequently.

    The post was edited 1 time, last by barak ().