Safemode: lfuse changed! Was ff, and is now 0

I have been programming atmega2560(custom pcb) via ISP. And i have been programming via ISP for a month, this works fine, suddenly I got this and couldnt program anymore.

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x3a37
0x00 != 0x01
avrdude: verification error; content mismatch
avrdude: safemode: lfuse changed! Was ff, and is now 0

Programmer : Atmega2560 (Arduino mega)
Target : Custom pcb Atmega2560
Ide : VScode

You should post the content of the "Custom pcb Atmega2560" section of your boards.txt!

As above and the compiler is complaining about the fuse settings

[env:program_via_ArduinoISP]
platform = atmelavr
framework = arduino
upload_protocol = custom
board = megaatmega2560
upload_speed = 19200
upload_port=COM13
monitor_speed = 115200
upload_flags =
-C
; use "tool-avrdude-megaavr" for the atmelmegaavr platform
${platformio.packages_dir}/tool-avrdude/avrdude.conf
-p
$BOARD_MCU
-P
$UPLOAD_PORT
-b
$UPLOAD_SPEED
-c
stk500v1
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
lib_deps =
tomstewart89/Callback@^1.1
bblanchon/ArduinoJson@^6.19.4

That doesn't look like a boards.txt from the Arduino IDE. It looks like some file from the PlatformIO system. Ask for help on their boards please.

A few hints nevertheless: At least the Arduino IDE uses stk500v2 for the Mega2560 and an upload speed of 115200 baud.

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