Keil Logo

Cannot program 2 boards with any ULINK2

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
N. P.
Posted
18-Sep-2008 09:48 GMT
Toolset
ARM
New! Cannot program 2 boards with any ULINK2

Hello

I have 2 ULINK2 USB-JTAG Adapters and two MCBSTR9 Keil Boards. The former has a STR12FW44 MCU (Vers.3) and the latter a STR912FAW44 (Vers.4). I cannot program Flash memory in any board using any adapter. Messages I obtain are:

Error: Flash Download failed - ARM966E-S   or
Could not stop ARM device. Please check the JTAG cable.

First I though my project was badly configured, but I have spend some days checking it and I can't find where my error is. I've worked with ULINK and I never had problems to download my code.

Currently I'm using a licensed copy of uVision3 with MDK-ARM Version 3.22a. My configuration settings are:

Device: STR12FW44 or STR12FAW44 (I think it makes no difference).
Read/Only memory areas IROM1 checked (startup) address range: 0x0 - 0x88000

Debug settings: ULINK ARM Debugger. Use reset at startup, Verify Code Download, Download to Flash. ULINK 2 Firmware version is 1.36 and JTAG clock is 1MHz. By the way, ULIN2 is correctly listed as HID in PC hardware settings.

Driver for Flash programming: Update Target before debugging checked. Algorithm: STR91xFxx4 Flash Bank 0 (512K, starting at 0x000000): Erase sectors, Program, Verify and Reset and Run.

Perhaps I gave too much information, but I'm stalled and I don't know what to do. ¿Maybe is Flash corrupted?.

Any help would be appreciated. Thank you.

Read-Only
Author
Robert McNamara
Posted
18-Sep-2008 15:16 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Set the boot enable pins to boot from something other than FLASH (0,0 is boot from flash, 0,1 will always boot to something valid). If you do this you should be able to program these 2 boards with any working JTAG.

Read-Only
Author
N. P.
Posted
18-Sep-2008 16:18 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Hello Robert, and thanks for your help. But I think I need a little more knowledge.

What do you refer as boot enable pins?. I cannot find anything on this topic in Keil support knowledgebase. Is this some kind of hardware configuration or software instead?

As far I know, the CPU can boot only from Flash memory address 0x000000 (from Bank0 or Bank1). This is stated in STR91xF Datasheet and I can't find alternative configurations in STR9 reference manual.

So, even if it is a beginner question: where are those boot enable pins?.

Once again, thank you for your consideration.

PS: One odd thing: when I click uVision button "Options for target" I can see Utilities Tab correct displayed, but when I access by Flash -> Configure Flash tools there's nothing displayed on that tab. Maybe it is not related to my problem but who knows...

Read-Only
Author
Robert McNamara
Posted
18-Sep-2008 21:46 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Sorry, I may have jump the gun. I have a Keil STR7 and STM32 board and they both have boot enable lines that always allow you to boot the board to a stable state and be able to load via JTAG. I have on both of these boards loaded code into the base of flash that causes the problem that you describe and the way I have gotten them out is to boot to the System code by setting the boot enable lines to something other than the base of flash bank 0.

I have already steered you down the wrong path so feel free to ignore me at any time.

If you have at any time been able to load these boards, you "may" want to try using the JTAG to cause it to boot to bank1 and then try and load you code. If you have never been able to program them then they "may" be defective.

Read-Only
Author
Mikhail S.
Posted
18-Sep-2008 22:04 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

and JTAG clock is 1MHz.

Did you try set clock to 500 kHz? Some time it could help.

Read-Only
Author
Martin Günther
Posted
19-Sep-2008 06:54 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Hello N.P.

please see article http://www.keil.com/support/docs/3215.htm.

Best Regards,
Martin Guenther

Read-Only
Author
N. P.
Posted
19-Sep-2008 08:56 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Back again to work!

The fact is that last week I was able to program Bank1 with my code, and the application is running in both boards. But now I must to use Bank 0 (it's a similar application but running http web server) and I cannot download any code, even example code provided by Keil.

Changing JTAG clock didn't work. Bad luck...

Hello Martin. Unfortunately, I tried this method and I've tried once again: I get the same message and Full chip Erase failed in the console.

I expect to receive my old ULINK today. I'll try with it and then I'll post the results.

Thanks for the help.

(My mail address, which yesterday was ok, appears now as invalid to the forum. So I change the address)

Read-Only
Author
Tamir Michael
Posted
19-Sep-2008 09:36 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

you can erase your entire on-board flash using uv3 (see knowledge base for STR9 on the Keil site). what happens if you start your processor at the default 48 MHz? if you tried to program your device using invalid PLL settings, you may not be able to use JTAG with it.

Read-Only
Author
N. P.
Posted
19-Sep-2008 10:12 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Hello Tamir.
I've tried to erase full Flash following the instructions linked above by Martin. Is there another way to do that from uVision?

PLL configuration is the same as in Http Demo example. Master clock is derived from PLL, and it's value is 96MHz. I can change it to 48Mhz, but that would be still derived from PLL. Flash Memory Interface Clock (FMICLK) is RCLK divided by 2. Which in turns is Master clock divided by 2. So, in short:

fMSTR = fPLL = 96MHz
RCLK = fMSTR / 2 = 48MHz
FMICLK = RCLK / 2 = 24MHz

(now is when I miss my tiny 8051)

Should I change something in that configuration?. And if the problem was in PLL configuration... doesn't a simpler project as Blinky (who's master clock is 48MHz) should work?

Thank you.

Read-Only
Author
Martin Günther
Posted
19-Sep-2008 15:01 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Hello N.P.

The problem is the CSX (Chip Selcect Mapping) bit.
You said that application is running from Bank1 that means
CSX bit is set. If you now want to program Bank0 you need to reset the CSX bit before.

Best Regards,
Martin Guenther

Read-Only
Author
N. P.
Posted
19-Sep-2008 17:04 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

Thanks Martin. That sounds really reasonable.
Now I cannot try to change CSX bit (work ended!), but at least I have some hope to mend it next Monday.

I'll post if that solved my problem.

Best regards.

Read-Only
Author
N. P.
Posted
22-Sep-2008 08:20 GMT
Toolset
ARM
New! RE: Cannot program 2 boards with any ULINK2

It works!
Finally I change CSX bit and I could erase and reprogram my boards.

You guys have helped me a lot. Thanks to all. I'll do my best to help anyone in this forum if I had the chance.

Best regards!

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.