JTAGICE3 bricks Mega165A

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

Greetings,

 

I have a pretty interesting problem at hand.

 

Setup: AS6.2sp1, WIn7-64bit, JTAGICE3 FW version 3.25.

 

Problem: An attempt to erase ATMega165A via ISP bricks the device.

 

Symptom: After erase chip returns 0x00FFFFFF as device ID, indicating that the SPI i/f is disabled.

 

Additional info:

(1) It seems that this problem appeared after running latest Windows update.

As the JTAGICE3 appears as a CMSIS-DAP device, it is highly possible that something got wrong at HID driver level.

(2) The problem does not appear on ATMega325P device (same family), nor ATMega328. Will test later with ATMega165P.

(3) The problem appears on ATMega165A regardless of the design (tested with two completely different boards with minimum number of external components)

(4) All tested 165A chips are from same batch.

(5) Reinstall of AS6.2 did not help.

(6) Sometimes can recover via JTAG, sometimes not, i.e. looks like JTAG gets sometimes disabled as well.

 

So, assuming that either Windows update broke something or having counterfeit chips (although bought from reliable distributor).

 

Does anyone have an idea of how to probe further?

 

Cheers,

Heke

 

 

 

 

 

 

Last Edited: Fri. Jul 24, 2015 - 03:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well if the chips can be contacted by JTAG what are the fuses set to?

 

Also what ISP operation were you attempting when you "lost" them?

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

Anybody solve this? Similiar problem. Set fuses to turn off JTAG (don't use) with brownout at 4.3. Interal OSC div 8.

Loaded fuses, verify fail. Did again and passed. Now get ID all F's and nothing works.

 

Did a second board that has a 165 (different product) set fuses same, same error with fuses, but loads program and works.

 

Any way to unbrick or do I have to cut chip off board and replace?

 

Thanks

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

Unless your Flash is > 99.9% full you can afford to disable JTAG in software i.e. with JTD

 

I have never used mega165 or mega325.   But I can't see how or why ISP would be any different to every other traditional AVR chip.

 

If you possess another mega165,   this time keep JTAGEN fuse intact.

Try to reproduce the ISP problem.   Then examine the result via JTAG.

 

David.

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

"Dare to be naïve." - Buckminster Fuller

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

I have used 165's in the past with no problem. This is first time using internal clock. BTW, the other PCB uses external Osc. Don't remember having the fuse error before. Any ideas on that?

Thanks,

Steve

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

BTW: I intend to try the external clock from my STK500. Haven't had time To do that.

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

I see that you are a similar vintage to me.   I can assure you that I have written inappropriate Clock fuses.

 

I bet that 99% of members have done this too !!

 

If you can read an ID nothing is too bad.

ID = FF FF FF looks like SCK speed is too high.

 

If you can't "connect" this implies that you need an external clock to XTAL1 pin.

 

Are you using avrdude ?

Or AS7.0 ?

Which hardware programmer ?

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

david.prentice wrote:
I bet that 99% of members have done this too !!

Yea, count me among the many. wink

Check your ISP speed, it must be less then 1/4 the resulting cpu speed after the fuse change, power cycle.

 

Jim

 

FF = PI > S.E.T

 

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


Hi,

Yes, go back quite a ways. Started designing  military trainers using 74LS logic and $250K super mini computers. Have come a long way. Now retired (but working as a consultant to last employer) and designing controls for my model railroad. Using AS7 and Atmel-ICE. I prefered using AVRISP mkii and AS4, but my AVRISP died. Liked AS4 since the STK500 driver wotked with the ICC7 AVR. Now I have To flip between two programs. Picture not very good but you get the idea why I hope I don't have to replace the chip. BTW this board monitors 24 switches to set 24 turnouts (2 solenoids per turnout) with a capacitor discharge supply. The blank pads are missing connectors (though I had enoughsad

 

 

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

railroadnut wrote:
I prefered using AVRISP mkii and AS4, but my AVRISP died.

https://www.digikey.com/en/produ...

railroadnut wrote:
wotked with the ICC7 AVR

You mean there are two of us?

 

 

Jim

the other ICC user

 

 

FF = PI > S.E.T

 

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

Hi Jim,

Been using AVR ICC since 2000 when I started using Atmels. Write my windows GUI's with Borland 4 and APRO, Only need basic windows functions. So far everything still works under Win 10laugh.

BTW: I need to build 3 more of these boards so I want to known what happened before I do it againblush! There are 85 turnounts on this layout.

 

Steve

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



AVR STK500 User Guide

[top of page 32]

Figure 3-30. XTAL1 and OSCSEL Connections

 

"Dare to be naïve." - Buckminster Fuller

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

railroadnut wrote:
Using AS7 and Atmel-ICE.
Atmel-ICE can generate a clock signal.

railroadnut wrote:
I prefered using AVRISP mkii and AS4,
AVR Studo 4 can run on Windows 10 though am uncertain on the longevity of Microchip's dated copy of the Jungo driver (WinUSB does change)

railroadnut wrote:
but my AVRISP died.
The AVRISP mkII clone is recommended though, IIRC, there are a few posts on this forum about the lesser function clones (no serial number message to AVR/Atmel/Microchip Studo)

AVRISP mkII function-like (LUFA) has multiple distributors.

STK500v2-compatible AVRISP are inexpensive and numerous.

 


Oscillator Calibration | Microchip Studio

Atprogram Application Usage | Using Atmel-ICE for AVR® Programming In Mass Production

[mid-page]

  • calibrate: Performs the oscillator calibration procedure.

 

Can I Get a Genuine Atmel AVRISP MKII? | Blog | Kanda

USB AVRISP XPII - Waveshare Wiki

East :

Waveshare USB AVRISP XPII AVR ISP Programmer compatible with AT AVRISP mkII from ATMEL professional In System Programmer-in Demo Board from Computer & Office on Aliexpress.com | Alibaba Group

West :

Waveshare ATMEL AVR Programmer USB AVRISP XPII Compatible ATMEL Mk2 MKII Studio for sale online | eBay

AVR-ISP-MK2 - Open Source Hardware Board (Olimex, resistors for current limiting; uncertain as rugged as an Atmel AVRISP mkII)

Pololu USB AVR Programmer v2.1 (STK500v2)

 

"Dare to be naïve." - Buckminster Fuller

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

Atmel-ICE can generate a clock signal.

How? I looked at manual but didn't see anything obvious.

 

Steve

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

Instructions are elsewhere.

 

https://onlinedocs.microchip.com/?find=atmel-ice

atprogram calibrate command

Oscillator Calibration | Microchip Studio

 

"Dare to be naïve." - Buckminster Fuller