¿AVR MKII ISP triggering the short circuit protection?

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've got myself a new PCB with a ATmega128RFA1 and managed to program the µc a couple of times, but now for some reason I cant get to read the device signature.

I'm using an AVR MkII ISP to program the µC, but everytime I try to read from the device the red light of the programmer starts blinking.

¿can the µC be broken?
¿maybe a shortcircuit or something?

Is there something to check other than visually looking for short circuits?
I've measured the VCC - Ground resistance and it's over 20MOh or so.

Ideas ?

(I know it's a bad idea but, can the short circuit protection be skipped?)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Flashing orange (it's hard to tell the diff from red) means the isp connector is on backwards, or if on correctly, then it's not able to pull the reset line low, check your reset line pull up if you have one, or make sure reset is not tied to vcc. Is this on a breadboard (check your wiring again) or on a pcb?

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jccordill wrote:
Flashing orange (it's hard to tell the diff from red) means the isp connector is on backwards, or if on correctly, then it's not able to pull the reset line low,
It's red, really red, starts orange (when it tries to program) but then changes to blinking red, definetely red.
jccordill wrote:
check your reset line pull up if you have one, or make sure reset is not tied to vcc.
I have a 10k resistor between reset line and VCC
jccordill wrote:
Is this on a breadboard (check your wiring again) or on a pcb?

JC


I'ts a PCB.

====================
I wonder, if there's a bad connection between the programmer and the µC, could that cause the short circuit triggering?
(as far as I can tell, it shouldn't since the lines would be disconnected)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have a look at Cliff's tutorial on recovering from a locked out uC, found [url=https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325] HERE [/url].

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Have a look at Cliff's tutorial on recovering from a locked out uC, found HERE .

JC


It's no use.
That tutorial is meant 'only' for bad fuse programming.
I haven't changed the fuses on my µCs except for disabling the clock divider (so I have a 8MHz internal clock).
They are in fact running, since I managed to program the µC once or twice, but now I get a 'short circuit trigger' somewher and don't know where it is nor how to find it.
Could a broken µC make trigger this signal (on an AVR ISP MkII)?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you managed to program it since you changed the fuses?

If not, perhaps you did not change them as you think you did.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Have you managed to program it since you changed the fuses?

If not, perhaps you did not change them as you think you did.

JC


Yes.

First thing I did was to program the fuses, then I program them a couple of times before 'short-circuitting'.

I still get serial output from the last program I flashed (hence the internal 8MHz clock is working), but now I can't replace/update it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The way I'm trying to program them isn't using a 6pin ISP header, but connecting cables directly to some 'pcb holes' where I connect come cables directly, no header.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Then you most likely have a bad connection.

The AVR ISP mkII is very difficult to break.

If you can't program the PCB now then you really don't have anything to lose if you solder wires to the PCB.

You can either shove the other ends of the wires into the 6-Pin female header on the mkII, or solder the wires to a male 6-pin header, to then shove into the mkII's connector.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay, news: using the ISP port from a STK600 I can read the device signature, the programmed fuses and program the µC (x4).
In this case I'm supplying the energy directly from the STK600 board, using external power for the pcb also worked (at least once).

This 'success' tells me:
- The fuses are correct
- I don't have a short circuit (¿?)
- I can program the boards

But still, why is the short circuit protection beeing triggered on the AVRISP mkII?
Does the STK600 NOT have this protection?

BTW: Trying to program using the AVRISP mkII afterwards has the same problem than before.
(was that correct gramatically? or should I have said '... same problem that before?)
In both cases I'm using the same 'adapter' I build to connect the header to the PCB.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you ABSOLUTELY certain that the wires from the mkII are in the correct holes on the pcb? With the mkII unplugged from the pc and the circuit board, do you measure a short circuit between the mkII pins?

ps "same problem as before"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

RickB wrote:
Are you ABSOLUTELY certain that the wires from the mkII are in the correct holes on the pcb? With the mkII unplugged from the pc and the circuit board, do you measure a short circuit between the mkII pins?
Yes, absolutely certain.
There's no short circuit between the mkII pins (mk II unplugged from everything)
The mkII connector and the STK600 connector are the same.
The "adapter" (basically connect the programmer header to somw pins on the PCB) I'm using is one and the same. I use only one converter when programming using STK600 or mkII.
And lastly, the mkII programmer does manage to program other boards I have.

RickB wrote:
ps "same problem as before"
Got it, thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Remember that when using the SIP mkII you have to power the PCB, the mkII does not supply power to the PCB.

Also, the mkII needs to have Vtg pin connected to the PCB's V+. The mkII reads the PCB's V+ to set the voltage level of the signals.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel Studio 6.2 should give you the specific error if the protection circuit has triggered. The status is being read when a tool 'connect' is initiated (by pressing the apply button in the programming dialog for instance). You might need to click the dropdown arrow to be able to see the specific error.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Remember that when using the SIP mkII you have to power the PCB, the mkII does not supply power to the PCB.

Also, the mkII needs to have Vtg pin connected to the PCB's V+. The mkII reads the PCB's V+ to set the voltage level of the signals.

JC


Indeed, but when trying to read the device with no power,the mkII light stays green, a message appears on the screen saying that the voltage is outside the operating range and, if I choose to continue, another message indicates that it couldn't enter programming mode and to check connections with the µC.
On the output 'page', the only message that appears says:
Quote:
[WARNING] Read voltage 0,0V is outside selected device's operating range: 1,8 V to 3,6 V.

meolsen wrote:
Atmel Studio 6.2 should give you the specific error if the protection circuit has triggered. The status is being read when a tool 'connect' is initiated (by pressing the apply button in the programming dialog for instance). You might need to click the dropdown arrow to be able to see the specific error.

I'm using Atmel Studio 6.0.1996

The error I'm getting is

Quote:
[ERROR] Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00, ModuleName: TCF (TCF command: Device:startSession failed.)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
[WARNING] Read voltage 0,0V is outside selected device's operating range: 1,8 V to 3,6 V.

The PCB and micro need power to do anything.
They need power to run its program.
They need power to be able to read its signature.

If the ISP mkII is reading that the PCB's voltage, and hence the micro's voltage, is 0 V, then it won't let you proceed.

You need to have power to the PCB.

You need the Vtg pin on the 6-Pin header to be able to read the PCB's power.

Fix this and hopefully you will be up and running again.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Quote:
[WARNING] Read voltage 0,0V is outside selected device's operating range: 1,8 V to 3,6 V.

The PCB and micro need power to do anything.
They need power to run its program.
They need power to be able to read its signature.

If the ISP mkII is reading that the PCB's voltage, and hence the micro's voltage, is 0 V, then it won't let you proceed.

You need to have power to the PCB.

You need the Vtg pin on the 6-Pin header to be able to read the PCB's power.

Fix this and hopefully you will be up and running again.

JC


I guess I wasn't clear on this part.
This message primarily because RickB asked if there was a short circuit when unplugged from anything, I was just stating that there's no short circuit when unconnected, there's no short circuit if I disconnect de MOSI. SCK and MISO lines.

And yes, I know the board has to be 'power sourced' from elsewhere, and that's what I've done.
Supplying the board with an external 3.3V power suppy, I connect the mkII to the corresponding ISP pins, I read voltage with Atmel Studio (it does says 3.3V) but when I try to read the Device signature, I get the error posted above ("[ERROR] Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00, ModuleName: TCF (TCF command: Device:startSession failed.)") and the mkII led stays blinking red (yup, red, not orange or green, no doubt about it).

I still have no idea what could it be.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tglaria

Where are you located? Might be a freak within convenient driving distance. A second pair of eyes might help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Might be a freak within convenient driving distance

I'm guessing not in fact (having looked at the IP I can't recall ever seeing anyone who's said they live in that country!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can you post your Schematic
is it your programming ISP lines are connected to any other active circuit outputs or any strong pullup/pull down resistor

P.Ashok Kumar

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

RickB wrote:
tglaria

Where are you located? Might be a freak within convenient driving distance. A second pair of eyes might help.

clawson wrote:
Quote:

Might be a freak within convenient driving distance

I'm guessing not in fact (having looked at the IP I can't recall ever seeing anyone who's said they live in that country!)

I'm in Chile, I don't think there could be anyone around here.

So, do I let it go and assume it's one of those mysteries in life without answer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to 'end' the story, I gave up and never found the reason why I couldn't use the mkII programmer.