After reading uncountable threads and articles regarding this topic, I still cannot communicate my ULINK2 with Keil evaluation board MCBSTR9 (v4). So I need some help.
The problem came when suddenly, when trying to download an application (as I've been doing every day), error message Too many JTAGS devices in chain appeared (I don't have multiple devices in chain).
As I could see, no device information was displayed in uVision, under ULINK ARM debugger settings menu. Automatic information about the device did not appear.
Changing JTAG clock didn't work.
Following the instructions in http://www.keil.com/support/docs/3354.htm , I uninstalled Windows USB drivers. Diagnosis changed, but not enough: now the error message is JTAG communication failure.
ULINK2 was and still is correctly displayed as Human Interface Device.
I tried to manual configure device information (IDCODE, Device Name, IR len) with the information provided by ARM but my efforts were unsuccessful. And I don't have much JTAG knowledge.
I was developing and testing one application to put STR9 in Sleep mode, it must be wake up by the RTC clock. Perhaps this information is useful to solve my problem.
What can I do to re-enable JTAG communication?
Thanks in advance.
Yes, I'm following the procedure you link (my english is not natural, so perhaps it was not clear what I was doing). Those are the steps I'm following:
1. I power off the board (unplug USB). 2. I hold RESET button (S1 in my board) 3. Power on the board (plug USB) while holding S1. 4. Go to Flash - Erase option in uVision menubar. Blinky project is open. 5. Click Erase. 6. Count to one (inside my head). 7. Release S1.
I get the error message: JTAG Comunnication Failure
Perhaps the most difficult part is to count between 0.5 and 1.5, but I suppose that at least one of the multiple times I tried was correctly timed.
By the way, I think that the error message appears before one second has passed after I click 'Erase'. Releasing S1 after this message appears doesn't seem to have any effect.
Thanks for your patience.
When I last tried this procedure a couple of months ago (I trashed my flash by loading software that incorrectly configured the system clock) I remember that selecting "erase flash" from uVision caused the tool to wait until I released my reset. I release the flash not more than 0.5-0.8 seconds after selecting "erase flash". Are you sure you really hold the reset down? You must be missing something in the procedure. I had the exact same problem - erasing the flash solved it. What happens if you lower the JTAG clock, or put it back on 1 MHz...?
It works!!
I have added one step to the the procedure. I don't know whether it was the key, but I'm going to post the exact steps which worked.
1. I power off the board (unplug USB). 2. Unplug ULINK2 adapter fron JTAG connector. 3. Plug in ULINK2 adapter. 4. I hold RESET button (S1 in my board) 5. Power on the board (plug USB) while holding S1. 6. Go to Flash - Erase option in uVision menubar. Blinky project is open. 7. Click Erase. 8. Count to one (inside my head). 9. Release S1.
As Tamir said, uVision wait for the release of S1 (before it didn't). Flash was erased and now Blinky is running.
Now I have to deal with RTC and with the fact that I corrupted somehow the clock control registers. My code scares me!
Thanks for your help and insistence, Tamir. I wouldn't have tried so many times without it.
Good work. My board came along with a ULINK-ME, which as far as I remember did not required it be physically disconnected from the board when erasing the flash.