Thanks for the quick answer!
Just to be sure, you propose to XOR each word (16 bit) in flash and keep the
result for checksum.
It is effectivly very quick.
However, I don't understand your comment:
> For this you have to exclude the unused parts or set them to 0xff.

Do you know a way to put this checksum in the .elf before programming the
device?

Thanks!!!
Fred

-----Original Message-----
From: [email protected]
[mailto:[email protected]]on Behalf Of
[email protected]
Sent: 3 mars, 2005 12:58
To: [email protected]
Subject: Re: [Mspgcc-users] Code checksum???


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




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to