ATmega88PB unprogrammable

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

Hi guys,

 

I made an error with my fuse bits. I changed CKSEL to 128 kHz Int RC with the CKDIV8 fuse bit on. The device is now effectively running at 16 kHz clock speed as far as I understand. I can see that the MCU is still executing my program, just very slowly.

 

The problem is that I am unable to connect to the MCU using Atmel-ICE. The problem seems to be that Atmel-ICE cannot run its ISP slower than 8 kHz, and I would like to run it at four or even two kilohertz.

 

I tried with Atmel Studio 7.0 which lets you set the ISP speed to 8 kHz minimum. I also tried with atprogram.exe which terminates with a mysterious

 

[ERROR] ispSetBaud: Error status received: Got 0xcd, expected 0x00 (Unknown status message). (TCF Error code: 1)

 

error when setting the ISP clock speed below 8 kHz. When set to 8 kHz or more I get

 

[ERROR] Could not establish connection to device. Please check input parameters, hardware connections, security bit, target power, and clock values.
Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool). (TCF Error code: 1)

 

What to do?

Last Edited: Wed. Sep 12, 2018 - 04:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OUCH!

 

If the part is a DIP package, you could see if there is a freak in the area with an STK500 that can HVPP the device and reset the fuses.  Otherwise, kiss the device off and pop in a freshie.

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

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

Entropia wrote:
The problem is that I am unable to connect to the MCU using Atmel-ICE. The problem seems to be that Atmel-ICE cannot run its ISP slower than 8 kHz, ...
How low can Atmel-ICE go?

Could try AVRDUDE -B option instead of Atmel Studio and/or atprogram.exe

Entropia wrote:
...  and I would like to run it at four or even two kilohertz.
Pololu USB AVR programmer v2 and subsequent does 1.465KHz for AVR recovery.

Pololu Robotics and Electronics

Pololu

5.10. Using the clock output to revive AVRs

https://www.pololu.com/docs/0J67/5.10

 


http://nongnu.askapache.com/avrdude/avrdude-doc-6.3.pdf

(page 12)

-B bitclock

Specify the bit clock period for the JTAG interface or the ISP clock (JTAG ICE only). The value is a floating-point number in microseconds. Alternatively, the value might be suffixed with "Hz", "kHz", or "MHz", in order to specify the bit clock frequency, rather than a period. The default value of the JTAG ICE results in about 1 microsecond bit clock period, suitable for target MCUs running at 4 MHz clock and above. Unlike certain parameters in the STK500, the JTAG ICE resets all its parameters to default values when the programming software signs off from the ICE, so for MCUs running at lower clock speeds, this parameter must be specified on the command-line. It can also be set in the configuration file by using the ’default bitclock’ keyword.

 

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

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

The part is in a TQFP32 package, so it's a bit tedious to swap. Luckily I have a few extra boards laying around so I can get back to developing the software.

 

I must check though; if I disable the CKDIV8 fuse and enable 128 kHz Int RC, I should be able to program it normally using Atmel-ICE and SPI?

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

When in the dark remember-the future looks brighter than ever.

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

If you have an Arduino kicking around:

https://pastebin.com/60xYhyq0

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

avrcandies wrote:
another interesting method (can erase all chip settings at very slow speeds)

IIRC bit-banging with an FTDI chip is quite slow.  (I don't remember the speed)

https://arduino.stackexchange.co...

leads to https://www.ftdichip.com/Support...

Also https://forum.arduino.cc/index.p... and others.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Sat. Sep 15, 2018 - 07:27 PM