CRC calculation for otp header

5 posts / 0 new
Last post
dhirajp15
Offline
Last seen:1 year 8 months ago
加入:2016-06-08 15:26
CRC calculation for otp header

Hi Dialog,
I am using custom fields of otp header to store some data as suggested :
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...
I am also doing otp progamming using SmartSnippets CommandLineInterface. Now since each of da583 need to have unique data inside the custom fields I have to generate unique otp headers for each device.Currently each time I open smart snippets ,modify custom fields in otp header and export it to form a hex file.Further I burn this hex file using Smart Snippets command line. I am unable to modify the custom field directly due to CRC check for every 4 byte of data.I want to knw if there is a tool to calculate CRC for bunch of data to be stored in otp header? or Does SmartSnippet CLI has such command to modify the otp header file before flashing?
Regards,
dhiraj

Device:
MT_dialog
Offline
Last seen:1 week 5 days ago
工作人员
加入:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

If i understood correctly the procedure, you are manually changing the file but the CRC check fails when you are trying to burn it (which is logical). No there is no such tool provided by dialog, but there tools even online that can do what you would like to and place the proper CRC at the end of your manually changed .hex file.

Thanks MT_dialog

dhirajp15
Offline
Last seen:1 year 8 months ago
加入:2016-06-08 15:26
Hi MT_Dialog,

Hi MT_Dialog,
The online tools ask of initial vector and CRC polynomial used for generation, where will I get it? I also try using some CRC polynomials but it dint match.
Thanks
Dhiraj

MT_dialog
Offline
Last seen:1 week 5 days ago
工作人员
加入:2015-06-08 11:34
Hi dhirajp,

Hi dhirajp,

What you need to calculate and place in the end of the .hex file is the checksum that the .hex file takes at the end of each line, so this is an online tool that i ve been using.

http://easyonlineconverter.com/converters/checksum_converter.html

Thanks MT_dialog

dhirajp15
Offline
Last seen:1 year 8 months ago
加入:2016-06-08 15:26
Ohh yes ! Thanks a lot MT

Ohh yes ! Thanks a lot MT_Dialog.