I need to find the simple solution that helps me to destroy(erase) flash memory by Attiny85 itself. It means that I want to write some function (for example kill();) that will complete earase flash memory page by page. In the Attiny25/45/85 I found the next article:
19.1 Performing Page Erase by SPM To execute Page Erase, set up the address in the Z-pointer, write "00000011" to SPMCSR and execute SPM within four clock cycles after writing SPMCSR. The data in R1 and R0 is ignored. The page address must be written to PCPAGE in the Z-register. Other bits in the Z-pointer will be ignored during this operation. Note: The CPU is halted during the Page Erase operation.
but I can't understand how to Implement It In C language In the CV IDE, so any help would be nice. Thank You.