If you are looking to lock bits on AVR® devices, specifically boot lock bits, then this tutorial will show you how. It also shows how to secure bootloader Flash memory and secure EEPROM memory using lock bits to prevent access to EEPROM and Flash memory.
This video will also cover how to program and clear fuse bits through Atmel Studio using the user interface and the command line. The video will finish by showing how to “chiperase” to reset the fuse lock bits.
If you are learning how to build a secure microcontroller application that cannot be easily reprogrammed. Check this video out!
Commands used in Atmel Studio Command Prompt
atprogram -d atmega328pb -t edbg -i jtag write -lb --values FC
atprogram -d atmega328pb -t edbg -i jtag read -lb
atprogram -d atmega328pb -t edbg -i jtag chiperase
Documentation references
--------------------------------------------------------------
Atmel Tools Documentation:
https://mchp.us/2YvUlVb
AVR Libc reference manual:
http://www.microchip.com/webdoc/AVRLibcReferenceManual/group__avr__lock.html
ATmega324PB datasheet: Program and Data Memory Lock bits
http://ww1.microchip.com/downloads/en/DeviceDoc/40001908A.pdf#page=347
ATmega 324PB Xplained Pro User Guide:
http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42633-ATmega324PB-Xplained-Pro_User-Guide.pdf
AVR, MCU, ATmega324PB, mega324, mega, mega324PB, example, explained, xplained, xplain, insights, insight, tinyAVR, megaAVR, tiny, Microchip, Atmel, security bits, memory, boot loader, bootloader access, program EEPROM, read SPM, LPM, load flash sections, external tool, programmer, debugger, safety fuse ,fuses ,BLB, LB, BLB0, BLB1, chip erase ,chiperase ,clear, lock bits avr, microcontroller lock bootloader, microcontroller security, microcontroller memory security, lock bit fuses, boot lock bits, lock bits, restrict microcontroller flash access, restrict microcontroller bootloader access, secure eeprom memory, restrict arduino memory access, clear lock fuse bits, clear fuse bits, prevent access to avr memory, program lock bits, read lock bits, avr lock bits tutorial, atmel security lock bits, lock bites arduino, lock bit arduino, lock bits in arduino