Topic : Checksum in RFlasher

Forum : Ride IDE

Original Post
Post Information Post
August 24, 2007 - 7:51am
Guest

Hi,

When I press the statistics button in RFlasher, it returns a checksum from my STR710.

How is this checksum calculated?

Thanks for the help.

Silvan

Replies
Post Information Post
+1
0
-1
August 31, 2007 - 1:26pm
Guest

Hi,

I now tried several checksum calculations on the flash content, but did not find the correct one...
(sum32, crc, ...)

When I read the checksum of an empty flash, it still returns a value. So it can not simply be the sum of the flash data or somthing like this. But reading the checksum works very fast. So it can not be that complicated to build it...

Would be great if anyone had an idea what this checksum means.

Thanks,
Silvan

+1
0
-1
August 31, 2007 - 2:06pm
Raisonance Support Team

Hi,

The checksum is the sum of all the 32-bits words, keeping only the 32 lower weight bits.

An empty flash is full of 0xFFFFFFFF, which explains why you have a non-zero checksum when calculating the checksum on a blank part:
You get ( 0x100000000 - )

Some versions of RIDE include a bug that multiplies the checksum by 2 or 4. I'm not sure if the fix was in the latest official release or if it will be the next... ;(

Anyways, why do you need to know how it is calculated? You only need to know that two identical parts will return the same checksum, if it is calculated with the same version of RIDE, and that there is very little chance that the same checksum comes for two different parts...

Vincent

+1
0
-1
August 31, 2007 - 3:19pm
Guest

Hi Vincent,

Thanks for the answer. But I'm still confused....

On an emty device, I read a checksum 0x00C1FCFE

I have a STR710Fz2 with 256k+16k Flash.

272k / 4 * 0xFF'FF'FF'FF = 10FFFFFFEF000 so, this is not what RFlasher reads....

We have to write the firmware revision plus the checksum onto the firmware label on our PCBs. I know, we can use the verify funtion to test the devices after production. But anyway, it's a company rule to write the checksum to the label and therefore we would also like to know what it means...

I use RFlasher Version 06.10.22, BN746

Thanks
Silvan

+1
0
-1
November 16, 2007 - 7:55am
Guest

Hi,

I just tested the checksum calculation with BN747 and it works well now.

Silvan

+1
0
-1
June 23, 2020 - 6:32am
Sharath L

Hi,

I am using RFlasher7 (Ride7 version 7.70.19.0218).

When I press the statistics button in RFlasher, it returns a checksum from my STM32L052x6. 

As mentioned above I tried to compute checksum by reading the 32bit data from flash and summing all the 32-bits words, keeping only the 32 lower weight bits. But, the checksum I obtained and checksum from RFlasher7 (statistics) are not same.

Has the logic for computing checksum in RFlasher changed?

Thanks,
Sharath