You can certainly calculate a CRC value for either flash or EEPROM memory, and compare it to a stored value. For the ATmega series, use of special instructions is required to read flash memory, and access to those instructions must be specifically enabled for your program.