Electronic – What Are Lock Bits


What are lock bits in microcontrollers used for? Are they something specific to AVRs, or used more of a general concept in microcontrollers?

Best Answer

Lock bits are used in a variety of microcontrollers, and are generally used to enforce hardware-level security of the code inside them (no readback of the flash is common, also sometimes referred to as 'code protect').

They're not 100% secure, but are generally good enough to keep 'honest people' out of your code. Enterprising hackers often find ways around the lock bits (glitching, fuzzing, and sometimes even making holes into specific parts of the IC to expose signal lines and transistors).

Take a look at sites like Flylogic Engineering to get a taste the level of sophistication out there when it comes to microcontroller security.