Hi, > I want to add a sort of checksum in my F1612 to be able to verify the code > integrity each time it is power-up. I wonder if someone has already > experience this problem. I'd like to know few things like: > 1- Which algorithm you use to obtain good performance without using a too > big function code size
the easiest and fastest algorithm is the bitwise parity with 16 bit integers: x1 ^ x2 ^ ... from the flash start to the end (0xffe). For this you have to exclude the unused parts or set them to 0xff. Regards, Rolf
