Hi,
I need to verify the Boot Rom checksum described in TMS320x2803x Piccolo Boot ROM Reference Guide chapter 4.1 (http://www.ti.com/lit/ug/sprugo0a/sprugo0a.pdf).
The documentation states that:
"Taking a 64-bit summation of all addresses within the ROM, except for the checksum locations, generates this checksum."
Does anybody know how to do that?
I tried the following code which does not work:
#define ROM_ADDR 0x3FE000
#define ROM_CHKS 0x3FFFBC
#define ROM_SIZE 0x2000
typedef unsigned long long Uint64;
Uint16 ROMChecksumOk()
{
Uint16 i, *pword;
Uint64 sum, *psum;
pword = (Uint16*)ROM_ADDR;
sum = 0;
for (i = 0; i < (ROM_CHKS - ROM_ADDR); i++)
{
sum += pword[i];
}
for (i += 4; i < ROM_SIZE; i++)
{
sum += pword[i];
}
psum = (Uint64*)ROM_CHKS;
return sum == *psum;
}
unlock[LE].4/4/18