cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with inDART and target clock

peterharris9
Associate II
Posted on August 26, 2003 at 05:48

Problem with inDART and target clock

11 REPLIES 11
peterharris9
Associate II
Posted on August 18, 2003 at 02:44

Hi

I am trying to use a USB inDart-ST7F/521 with an existing ST7F521 design.

Everything works fine provided that

Tools->MCU Configuration->settings->ignore option bytes. Is selected.

The problems start when I try to use the clock on the target hardware. This is a standard crystal arrangement

consisting of a 16MHz crystal connected between the micro OSC1 & OSC2 pins with a 33pf cap from each side of

the crystal to ground.

The option bytes values set in the tool match those programmed into the micro.

The value is 0xfd87 (resonator oscillator, 8-16MHz).

This is the setting used in the existing design so I know it works.

Now when I select

Tools->MCU Configuration->settings->use option bytes

and launch a debug session I get the following output:

------------------------------- Start of debugger output --------------------------------

Starting debug session...

-> Emulator reset (LPT1)...

Connected to the GDI Debug Instrument. done.

Opening application C:\cvswork\crud\output\crud.elf...

-> failed to download application: error: gdi-error in indart: communication error between the instrument and the target device. for a list of possible causes of this error, please read the user's manual.

Application closed.

-> Chip-reset...Error: gdi-error in indart: communication error between the instrument and the target device. for a list of possible causes of this error, please read the user's manual.

** Application stopped

------------------------------- End of debugger output --------------------------------

The results are the same at all values of Embedded command frequency.

What have I missed?

Peter

poo
Associate II
Posted on August 18, 2003 at 06:40

Hi,

Your problem is the 12MHz clk on the Indart ST7F and the 16MHz clk on your application board are conflicting with each other. The solution to this problem is to construct a second cable for connecting the indart to your target hardware, identicle to the 10way connector you have now, except that pin 9 (OSC from the Indart Kit) is disconnected. So therefore when you are using the clk from the indart use the original cable (with Ignore Option Bytes selected), when you want to use your application boards clk, use the modified cable with pin 9 disconnected (and use the option bytes from your application).

This should sort you out.

[ This message was edited by: on 19-08-2003 01:19 ]
peterharris9
Associate II
Posted on August 18, 2003 at 22:26

Thanks for that, it works.

A warning note for others:

When trying this with the clock line cut, I had to try several values of 'Embedded command frequency' before things started working. With each failure the option bytes programmed into the micro were corrupted and had to be restored using datablaze and an unmodified cable.

[ This message was edited by: Battman on 19-08-2003 01:57 ]
sisto
Associate II
Posted on August 21, 2003 at 16:51

Hi,

I have a Battman's similar problem with InDART-ST7C and STC334xy DemoBoard equipped with a ST72C334N4B6 56DIL controller.

In waiting for my prototype CS board, I have implemented some parts of my application circuit on demo board to save time for debugging.

My application design will works at Ta max of 40°C and since I need a speed run, I will use a 16MHz cristal connected between OSC1 and OSC2 in the classic configuration already tested in many others applications.

To make a correct debug I've equipped the DemoBoard with a 16MHz oscillator wich work fine and generate a sine 16MHz clock.

I have changed the ''OSC SEL'' jumper from ''INT'' to ''EXT'' and verified with a scope the presence of clock frequency on micro pin OSC1 .

I've configured InDART option register with High Resonator option and then launched the debugger but the response is the same of Battman :

''Starting debug session...

-> Emulator reset (LPT1)...

Connected to the GDI Debug Instrument. done.

Opening application C:\cvswork\crud\output\crud.elf...

-> failed to download application: error: gdi-error in indart: communication error between the instrument and the target device. for a list of possible causes of this error, please read the user's manual. ''

Then I have changed the Option Register with ''Ext clock (standby) with same results.

For me too, the results are the same at all values of Embedded command frequency.

I don't understand the cause.

May anyone help me and... ''my debugging'' ?

thanks

Sixtus

P.S. the InDART works fine with other target board applications already developed and in full production.

[ This message was edited by: sixtus on 21-08-2003 20:23 ]

[ This message was edited by: sixtus on 21-08-2003 20:24 ]

[ This message was edited by: sixtus on 21-08-2003 20:26 ]

peterharris9
Associate II
Posted on August 21, 2003 at 19:22

Hi Sixtus

The problem is that there are 2 clocks running at the same time.

What to do:

Program the option bytes in the micro so that your 16MHz clock works.

Set the option bytes in visual debug to exactly match those in the micro.

Break the clock connection between the inDart and your target. This is pin 9 on the 10way ribbon cable. I have added a switch to mine.

Once you find the correct embedded command frequency, visual debug should now work.

sisto
Associate II
Posted on August 22, 2003 at 06:51

Hi Battman,

I have an LPT inDART ST7C and for now my target is just a IDB-ST7C334 Demo Board.

The ISP's 9 pin of Demo Board (and for all ST7C... application targets) is Not Connected so I'm sorry, but Your suggestion is not an help for me.

I think that the problem is on the Demo Board and/or configuration, but actually all Softec support offices are closed for holidays and then ... I have a problem...

I've tested the DemoBoard with Softec ADC demo program sample with same results. I have used another Demo Board for ST72C254 controller using internal RC and with same demo program for this controller, without results.

I've suppose that the choice of internal RC oscillator, that is a flash bit on option register, are in conflict with other oscillator choices tries.

A possible solution may be to erase the demo board controller option byte, but I don't know how to do this without a previous inDART connection.

Another possible solution may be to change the Demo Board controller but...

Boh !!

thanks for Your attention.

Sistus

ldefend1
Associate II
Posted on August 22, 2003 at 07:24

inDART-ST72C hasn't got any clock signal on pin 9.

The oscillator circuitry is working according to the Option Bytes specifications. Maybe there was a mistake in the following settings:

- Full memory protection (must be NOT PROTECTED)

- Watchdog activation (must be SOFTWARE)

- Oscillator selection (but seems that Sixtus set it correctly)

Please note that on the demoboard OSC2 is straight connected to GND signal.

[ This message was edited by: friul on 22-08-2003 11:28 ]
nciot
Associate II
Posted on August 22, 2003 at 08:33

Hi Sistus,

I just want to let you know that our Technical Support office has never been closed this summer.

Therefore you can send an e-mail, explaining all your doubts, to the account:

mailto:support@softecmicro.com

I'll be happy to answer you!

Cheers

[ This message was edited by: Nicola on 22-08-2003 12:04 ]

[ This message was edited by: Nicola on 22-08-2003 12:05 ]

sisto
Associate II
Posted on August 23, 2003 at 07:15

Hi friul,

I have tested all possibles option byte selection configuration, including Your indications, without positive results.

According the schematic, I know the OSC1 e OSC2 demoboard hardware configuration; infact I've used a 16MHz oscillator module instead of a simple traditional 16MHz cristal. With a scope, I've verified the presence of 16MHz clock at OSC1 pin of Demoboard ST72C334N4B6 controller.

Now my doubt and question is: what's appen if I set the oscillator option byte for an oscillator configuration, but using another external hardware oscillator configuration?

Since any successive option byte modification presume a correct inDART connection, but this connection is not possible due an incorrect oscillator choice, I think that wa are in a unresolvable problem loop.

I think also, that the last solution is to change the DemoBoard microcontroller.

What do You think about ?

Sixtus

For Nicola (Softec Support):

Sorry Nicola, but I've tried to call the support tel. number, but a memorized message replay me that offices are closed. Effectively she said only ''... closed'' not ''... closed for holidays'' so I have understand.

Now I'm in contact with Luca and I hope to solve the problem.

Sincerely

P.S.

A proposit.. friul dacordo, ma da dula' scrivitu ?

Io o soi a sta' a Palme e o podaresin ancje sintisi diretamentri.

tu voras capit che io las feries las pasi a lavora' e a scombati cun chesz problemas dal c..., quant che dut il rest dal mont a squasi, a le vie.

Mandi,

Sisto

[ This message was edited by: sixtus on 23-08-2003 10:47 ]