ADSP BF 548 Checksum calculation.

HI Everybody

Iam using ADSP BF 548 evaluation board in my project,i need to calculate checksum of my application code,i want to use Xor for checksum,but i am not getting which address my code is stored ?iam booting my code from external flash(NOR FLASH). do i need to use nor flash address read and need to calculate checksum? can anybody suggest me how to calculate checksum?

below is the sample code for calculating checksum.

can anybody suggest us how i have to take address?

unsigned int chkSumCnt=0;
unsigned int *FlashAddress = (unsigned int *)0xffa10000;
unsigned short m_nCheckSum=0;

for(chkSumCnt=0;chkSumCnt<=0x3FFF;chkSumCnt++)
{
      m_nCheckSum^=*FlashAddress;
      FlashAddress++;
}
printf("Chksm is %x\n\r",m_nCheckSum);.

Best regards

Amar TR

Software engineer

SLN technologies.

Parents
  • Dear Jithul

    Thanks for the reply,actually i need to calculate the checksum of our application code, here the checksum is for verification purpose to test every time the code is booted correctly or not, as specified we are calculating the XOR checksum, here i am not able to find from which address the checksum has to be calculated,since iam booting my application code from External flash,whether i have to take external flash address for calculating checksum or SRAM address?

    If i need to take external flash address is it i have to take from 0x20000000(starting address of External flash)?

    of if i have to take SRAM address can u specify address range(start and end address).

    Best regards

    Amar TR

    Software engineer

    SLN technologies.

Reply
  • Dear Jithul

    Thanks for the reply,actually i need to calculate the checksum of our application code, here the checksum is for verification purpose to test every time the code is booted correctly or not, as specified we are calculating the XOR checksum, here i am not able to find from which address the checksum has to be calculated,since iam booting my application code from External flash,whether i have to take external flash address for calculating checksum or SRAM address?

    If i need to take external flash address is it i have to take from 0x20000000(starting address of External flash)?

    of if i have to take SRAM address can u specify address range(start and end address).

    Best regards

    Amar TR

    Software engineer

    SLN technologies.

Children
No Data