0
\$\begingroup\$

I created boot-loader code for reprogramming application section. I use Wiznet W5500 SPI to Ethernet chip, my goal is that only i can reprogram the device using LAN / WAN. The read write command is different from atmel's standard, so i assume that no one will know.

The problem is: How do i set the lock bits to prevent reading the application by ISP?

KJA
98311 silver badges24 bronze badges
asked Dec 12, 2020 at 4:15
\$\endgroup\$
1
  • \$\begingroup\$ Security by obscurity is always a bad idea. There will always be someone to find out, if there is enough motivation. However, you might block the casual user. \$\endgroup\$ Commented Dec 17, 2020 at 7:00

1 Answer 1

2
\$\begingroup\$

Every AVR microcontroller has Lock-bits to protect the memory. From the datasheet: Atmega328P lock bits And if you're using 'ProgIsp' programmer, simply click the button like the following image: ProgIsp Then, set two lock bits to 0 and press the write button: Fuse bits By doing this, you can not read the flash and EEPROM but you will be able to re-flash the chip. However, every time you re-flash the chip, lock bits will be set to 1 again and you need to lock it after flashing.

answered Dec 12, 2020 at 13:07
\$\endgroup\$
2
  • \$\begingroup\$ if i set the lock bits (LB1 & LB2 to zero), will i be able to rewrite the application section again in the future using my bootloader which i have stored in the chip? \$\endgroup\$ Commented Dec 13, 2020 at 8:31
  • 1
    \$\begingroup\$ Only with full chip erase. So not with bootloader. \$\endgroup\$ Commented Dec 13, 2020 at 9:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.