Issue burning bootloader on ATMEGA328PB with 1.8432Mhz crystal

Hi, I'm using an AVRISP-MKII to problem a board I've made. This time I'm trying to use a 1.8432Mhz external crystal to keep power down with the benefit of better UART compatibility.

I'm using MINICORE (External 1.8432 Mhz, 1.8V BOD, LTO disabled, 328PB with AVRISP mkii (minicore) programmer.

The first time I try to run the "Burn Bootloader" (so set the fuses) I see good messages in the output: (some of the messages): -
Device signature = 0x1e9516 (probably m328pb)
1 bytes of lock written
reading input file "0b11110110" - writing efuse (1 bytes):
reading input file "0b11010111" - writing hfuse (1 bytes):
input file 0b11111111 contains 1 bytes -1 bytes of lfuse verified

But then, after this, I get this message: -
stk500v2_command(): command failed
stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
Double check connections and try again, or use -F to override this check.

After this I never seem to be able to communicate with the ATMEGA328PU again - it's like it's bricked.

I've been trying to see if the problem is the speed the AVRISPmkII is trying to write to the ATMEGA with the low speed crystal (by changing the -B option in the avrdude CLI command - but no options (e.g. -B 4) make any difference

Does anyone have any idea what state I'm getting the ATMEGA328PB into and how to correctly program the chip with a 1.8432Mhz clock configuration ?

thank you very much,

Derek

You must ensure that the ISP programmer clock speed is less that 1/4 of the CPU clock speed. 250 kHz would be a good choice.

As an aside, lowering the clock speed does not accomplish much in the way of power saving, because it simply takes that much longer to do whatever is required. Effective use of sleep modes is almost always a better approach.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.