Home > Mobile >  Figure out Fujitsu's CheckSum by the formula from datasheet
Figure out Fujitsu's CheckSum by the formula from datasheet

Time:07-01

I'm implementing UART ROM write to the Fujitsu's mcu and im stucked with CheckSum calculation, the writing requires 2 CRC bytes at the end of the 512 byte package. But how to calculate them? i cant get it. I'm using the original Fujitsu Programmer to check the crc it calculates on each of my data transactions, for exmaple: if i'm sending 512 byte ( all zeros and first byte 0x11)

1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Then the programmer calcualte crc as:

enter image description here

I was checking Fujitsu's datasheet, and found this:

enter image description here

But i cant understand anything, im really bad at Further Mathematics, can someone direct me on the rigt path? What Checksum type is it?

/////////////////////////////////////

EDIT

The formula is not related to the checksum i need :( But some guy shared some info about BOOTROM of fujitsu and accrording to 0x30 and 0x31 which is the same answer from my mcu aswell for page write, he has same crc algorithm. he said its crc16 with polynome 0x1021 and sahred screen of his function: enter image description here

and seems like its init 0x0000 i have checked all known crc16 with polynome 0x1021 and init 0x0000, cant get the answer i need (for 0x11 as example)

/////////////////////////////////////

EDIT2 There are some more examples:

1)

01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

gives me 0x8108 CRC

  1. 00 02 ( rest 520 bytes are ZEROS, dont want to spamm here) gives me 0x0200

  2. if i put the same values but in the end of the package: 511 bytes zeros and 512 byte is 0x01 it gives me (0x8108 crc):

    0x8108 CRC

  3. same as above but with 02 ( 511 bytes zeros and 512 is 0x02) gives me 0x8318 CRC:

0x02 at the end

i can check any data which can possibly help to figure it out

CodePudding user response:

Your checksum reference produces a one byte result. Not two bytes. However those two bytes are generated, it is not done with what you found. Where or how did you get the 0x1e and 0xf0? Are you sure those bytes represent a checksum?

Update:

Given the additional examples, all I can say is that it is not a CRC. There is some evidence that it is a checksum, since the same value was obtained from a 01 at the start and a 01 at the end. However there is also evidence against it, since the same is not true when moving a 02 in the data.

  • Related