Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: Hardware checksum for MSP430fr5969

$
0
0
Hi, I have one application output file say update.txt and it has starting data as, @5800 5C 52 @5805 FF 01 00 1A 5F FE 5C 0B 5D 01 00 00 00 19 50 05 00 01 00 1A 5F 0C 5D 0B 5D 00 00 00 00 19 50 06 I got the checksum by enabling it in IAR. here 5C 52 is the checksum and from @5805 data will get start. In the code I am calculating the checksum by using below logic, uint16_t hwCRC(char p, int len) { CRCINIRES = 0; for (p = 0; p < c; p++) { CRCDI_L = *p; } return CRCINIRES; } My update.txt file will be 128 KB size , iam passing 400 bytes of data at each time and getting the crc , again passing 400 bytes and adding the previous CRC to present. like that iam doing for full 128 KB and making that as a final CRC. Here i tried passing the value from @5805 , tried by passing only data that is after 5805 but still i am getting wrong CRC at the final, can anybody suggest where i am going wrong..?

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>