PSOC Checsum

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
kyha_1602936
Level 1
Level 1

What type of Checksum does PSOC programmer perform on the Flash data?

   

I'm trying to verify my checksum with a separate program (Dataman) with a PSOC 3.

   

There are several types of checksum available:

   

Byte sum(x8)

   

Word sum Little Endian (x16)

   

Word sum Big Endian (x16)

   

CRC-CCIT

   

CRC-XModem

   

CRC-16

   

CRC-32

   

Negated (N)

   

Straight (N)

   

Supplement (U)

   

 

   

I'd like to know what kind of checksum PSOC Programmer uses so I can varify with a 3rd party program.

   

Thanks,

   

Kyle

0 Likes
1 Solution
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello

   

Can you please confirm if your question is about the row chceksum. If yes then, Checksum: two hex digits (1 byte), which is the least significant byte of the two's complement of the sum of the values of all fields except fields 1 and 6 (Start code ‘:’ byte and two hex digits of the Checksum)

   

Please have a look at the "PSoC® 3 Device Programming Specifications" (Link:http://www.cypress.com/documentation/programming-specifications/psoc-3-device-programming-specificat...)

   

Thanks,

   

Hima

View solution in original post

0 Likes
3 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello

   

Can you please confirm if your question is about the row chceksum. If yes then, Checksum: two hex digits (1 byte), which is the least significant byte of the two's complement of the sum of the values of all fields except fields 1 and 6 (Start code ‘:’ byte and two hex digits of the Checksum)

   

Please have a look at the "PSoC® 3 Device Programming Specifications" (Link:http://www.cypress.com/documentation/programming-specifications/psoc-3-device-programming-specificat...)

   

Thanks,

   

Hima

0 Likes
kyha_1602936
Level 1
Level 1

Thanks for linking that. I found a description of the checksum on page 71 of the document. I've embedded it below.

   

Both in the example and in the checksum definition it seems that the checksum is only of the header data contained in the Intel Hex File Format. It seems the checksum in not a summation of the entire program data stored in Flash, but of just this Intel Hex header?

   

If I were trying to read the checksum through Psoc Programmer it seems that it just checks this Intel Hex File Format and looks for the calculated checksum of the Intel Hex File.  

   

If I wanted to double check a PSOC 3 checksum by creating an algorithm to compute the checksum from bytecode of a programmed PSOC 3, if I'm understanding this correctly, I would need to:

   

1.) Read the byte code generate a Intel Hex File Format record.

   

2.) Compute the checksum of the that Intel Hex File Format record.

   

3.) I'm assuming this would be the same exact checksum as the one that is read through the PSOC Programmer tool?

   

I'm asking this because I have a manufacturer that is mass programmer the ICs prior to being populated and placed on boards. They are not able to use the PSOC programmer with the mass programming equipment. Their equipment only has the options for checksumming that I mentioned in the first post on this thread.

   

   

 

   

0 Likes
lock attach
Attachments are accessible only for community members.
emen_2218296
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

Hi Kyle,

   

You will get checksum of entire flash in hex file at hex file address location 0x9030 000. I have attached screenshot of my hex file highlighting checksum data. You can see description about in document "PSoC 3 Device Programming Specifications"page no.72. 

   

http://www.cypress.com/file/44676/download

   

All you need to do is use this value and compare against the value read from programming tool. Note that programming tool returns four bytes in that lower two bytes you need to compare.