ATmega328PB MiniCore ICSP w/ Atmel-ICE: “bad response to AVR sign-on command 0xa0” error



Hey everyone,

I’m trying to program an ATmega328PB (for the first time from the factory) on a custom board using an Atmel-ICE over ICSP at 3V3 w/ an 8MHz crystal (schematic attached). I’m running into a “bad response to AVR sign-on command 0xa0” error when uploading using programmer in the Arduino IDE (see attached). I tried burning the bootloader to set the PB fuses with the MiniCore 328PB board settings, but I get the same result.

First looked into seeing if this is a hardware issue… I probed power and SPI pins on the MCU and it passes continuity to the ICSP header, there aren’t any shorts (Measuring ~1Meg impedance between adjacent pins w/ DMM), and there is no visible damage. I removed all the extra components from the board so it’s just the MCU, 12->3V3 power circuitry, 8MHz crystal + 22pF XTAL caps, 10k reset pull-up, AREF cap, and ICSP header. That it could be a timing issue from the 1nF noise decoupling caps I added to data lines However I’m still getting the same error even after removing those.

I used an Oscope when trying to upload the code and verified 3V3 waveforms on SCLK, MOSI, and I see reset getting pulled low initially from 3V3 to 0V. I’m able to visualize the MISO waveform, but it’s only 500mV max pp so it appears the MCU isn’t responding to the programmer.

I attempted uploading with avrdude via command line using a lower bit clock frequency using the -B flag, but that didn’t seem to help at all. The device signature of the chip is reading as 0F FF FF (probably because MISO isn’t responding?) when it’s expecting 1E 95 16.

Anyone have any thoughts on what I can try next, or see any glaring SPI hardware issues? Thanks for any feedback!

No response to AVRDUDE, prolly because no boot loader installed yet.

Triple check the SPI and RESET pins - ensuring nothing else is driving or sinking those pins.

and of course, ensure a stable ground snd Vcc are allied !

1 Like

Yes i think before you try and upload a code with 8MHz external, you need to burn the bootloader with those settings to set the fuses correctly.

To avoid 'bricking' the MCU though and to see if things are working correctly on the design, i would first attempt to upload using the default clock setting (which should be 8MHz internal i think) to confirm that the reset system is working as it should.

A note on your setup there is that the 3.3v regulator is doing quite a lot of work. I would step down from 12v to 5v and then step down from 5v to 3.3v. Of course the layout and heatsink provided will influence the performance of the regulators, and for just a simple upload the power setup doesn't actually matter all that much, since there is only a very small power requirement anyway.

1 Like

So far I’ve only tried to burn the bootloader with the fuse settings I want to change to. Thinking the next thing I’ll try is to burn with the default Minicore settings. Would I need to desolder the crystal before I burn?

No just hit 'burn bootloader' with 8 MHz external.
By default the fuses are set for an internal clock. Having a crystal connected does not interfere with that.
As i said before i would first attempt to burn a bootloader with an internal clock and try and upload with that setting to exclude any issues with the clock from the equation. And in that way excluded errors with the ICSP connections and reset system thereafter.

1 Like