I'm thinking about using some lock bits on an Atmega 328p. For some of them, the spec states they can only be cleared via a chip erase
A chip erase can be done using either serial or parallel programming, so I assume I can always do a chip erase to reprogram the device over SPI, as long as I didn't change the SPIEN fuse.
Is this correct? I can always clear everything over SPI, as long as SPI is enabled? I just want to make sure before I "brick" some boards.
Also, it seems I can't quite get the protection I'd like on the 328p.
I'd like to keep self-programming enabled so my boot-loader could load new code but have memory read over SPI disabled. It looks like the only way to have SPI read disabled is to disable SPI entirely. Which means I can no longer program the chip, since the cards don't have the hardware for parallel programming.
Is this a correct understanding? Also, please no comments about the futility of trying to protect Atmega firmware. There are plenty of posts elsewhere, and that's not the intent of the protection anyway.