I'm making an expensive device powered by an atmega32. I'd like to give potential customers the option of trying it before paying for it in full. After, say, 10 reboots in demo mode it will hang unless the user enters a code.
To do this, the unlock code and countdown timer stored in flash must be protected. And the counter must be altered for each demo mode reboot. Is that possible with the fuses of the AVR? Which memory would be best to use for this purpose?
Obviously, the application both before and after an unlock must be protected, too.
I'm using a bootloader today so that it's possible to put protection features both there and in the actual application.