I want to know how I can lock my firmware on the ATmega328P. I have tried different lock bit values such as 0x3C, 0x0F, 0x2F, 0x00, etc. With 0x3C and 0x00, the firmware dump using avrdude stops, but I am still able to upload new firmware.
From my research, I found that 0x0F should fully lock the chip, meaning we should not be able to dump the firmware or upload new firmware. However, in my case, I am still able to both dump the firmware and upload new code.
I need help in understanding which lock byte setting ensures that nobody can dump or upload new firmware. I have done some research but could not find clear and correct information. If anyone has reliable references or guidance, it would be greatly appreciated.
I don’t want to lock it permanently. After erasing, I just want to be able to burn the bootloader and upload new code, that’s all.
I would also like to know: if we only partially lock the ATmega328P (using lock bits), is it possible that other tools besides avrdude can still dump or read the firmware?