Go Down

Topic: change the lock bits on ATmega328P  (Read 224 times) previous topic - next topic

mygodetjy

I am using my PC connecting with Bus Pirate ISP then ATmega328p

I want to protect my ATmega328p from spying.

I am using the AVRdude command window to perform the task

Code: [Select]


avrdude -v -p m328p -P COM4 -C avrdude.conf -c buspirate -U flash:w:optiboot_atmega328.hex  -U lock:w:0xc0:m -v



My question is:

1)  can I change the setting at avrdude.conf for the lock bit, how it relates to the lock bits settings
in the avrdude.conf I saw the following line:

Code: [Select]

   memory "lock"
        size            = 1;
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
                          "x  x  x  x   x  x  x  x    x x x x  x o o x";

        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 i i 1",
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
        min_write_delay = 9000;
        max_write_delay = 9000;

What should I do in this conf file, also after I changed the bits successfully should I use:

avrdude -v -p m328p -P COM4  -c buspirate -U flash:w:optiboot_atmega328.hex  -U lock:w:0xc0:m -v

or:
avrdude -v -p m328p -P COM4  -c buspirate -U flash:w:optiboot_atmega328.hex  -U lock:w:0xc0:m -v

2)after I changed the setting how do I know if I am not able to read the hex file back

Go Up