[RESOLVED] 'Bricked' 1284P?

I just built a couple more of my 1284/644 boards and tonight thought I'd slot in a couple of blank uC's and set them up.

Since the blank factory chips run at 1Mhz by default, IDE won't burn the fuses via USBASP and 'Burn Bootloader' as the USBASP speed is too high.

Since I don't actually need the bootloader I thought I'd just burn the required fuses and I could then 'Upload using Programmer' from IDE as usual.

My USBASP has updated firmware so supports the Slow SCK via software.

Unfortunately I made a schoolboy error in my first attempt to set the fuses and this is what I did

avrdude -c usbasp -p ATMEGA1284P -v -B 4 -U lfuse:w:0xf7:m hfuse:w:0xd6:m efuse:w:0xfd:m

As you can see, I missed the -U option form the hfuse and efuse bits.

avrdude -c usbasp -p ATMEGA1284P -v -B 4 -U lfuse:w:0xf7:m -U hfuse:w:0xd6:m -U efuse:w:0xfd:m

This means that only the lfuse was programmed and instead of ending up with 0xf7 0xd6 and 0xfd I now have 0xf7 0x99 and 0xff. The factory settings were 0x62 0x99 and 0xff

On then trying to re set the other fuses I'm getting the 'target doesn't answer' error

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: set SCK frequency to 187500 Hz
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

So, have I 'bricked' this one or is there any way of getting it to respond via ICSP to set the remaining two fuses?

If not then looks like I'll be building a high voltage parallel programming rescue board this week! I have plenty more 1284 and 644 chips for now so it's not a major issue; I just feel like kicking myself!

Play it safe in the future - set up the mighty1284 core files and burn the bootloader every time so the fuses are set correctly.

Scratch that.

I just tried the 'bad' chip in another board and it answers AVRDude fine and I've managed to set the fuses properly now.

I can only imagine that it is an issue with the external clock on that one board. I'll investigate further tomorrow but it must be that as it programmed when on internal clock but went 'dead' after lfuse was programmed for external full swing crystal.

It'll take some fiddling as the crystal and caps are SMD parts and I don't have any spare crystals handy

Could be wrong value caps keeping the oscillator from oscillating.
You could try fuse settings to use internal 8 MHz oscillator and confirm the rest is working okay.

CrossRoads:
Play it safe in the future - set up the mighty1284 core files and burn the bootloader every time so the fuses are set correctly.
GitHub - maniacbug/mighty-1284p: Mighty 1284P Platform for Arduino

Thanks for the time to respond CrossRoads. I have the mighty1284 core set up and I use your Bobuino pin map (with the fixes applied for analog pins offset).

The only other changes are that I have lfuse set for the full swing option (after the serial programming issues, although it doesn't really matter now I'm using ICSP) and the hfuse set to preserve EEPROM through Erase (as I use EEPROM to save device user setup options).

I've got a few quick batch files set up now to check connection and change the fuses on 644 and 1284 MCU. It's a lot faster than burning the bootloader in IDE just to set the fuses.

I've just set a 644P up and tried some of my test sketches, so I'll play tomorrow to check some other stuff runs as well on the 644 as the 1284.

CrossRoads:
Could be wrong value caps keeping the oscillator from oscillating.
You could try fuse settings to use internal 8 MHz oscillator and confirm the rest is working okay.

The caps are correct and the same as used on the other 4 boards I've got working.

I'll have a play tomorrow as it's getting late here now. I can set the clock back to internal, without the DIV8 bit set, as you say. I could also just try a temporary attachment of a through hole crystal and/or caps.

First thing I'll do is check continuity between the IC socket pins and crystal/caps/ground. Unfortunately I don't have an oScope to check properly; it's on my wish list.

Thanks again.

Ok good luck. Connection issues can be a pain to find.

Ah well, I did have a little look before going to bed and I found the issue. :slight_smile:

I had a short to Gnd on one side of the crystal. Seems the solder mask had been scratched slightly and a tiny bit of solder had stuck to the ground plane. I managed to clean it away and it's now sprung into action.

Cool! Way better than having to pull parts.