FTDI Community

General Category => Discussion - Software => Topic started by: Cactus on February 27, 2018, 04:43:14 PM

Title: FT4222H Checksum
Post by: Cactus on February 27, 2018, 04:43:14 PM
Regarding the checksum. From what I gather, the checksum is the total of all the data bytes in the message. And according to the example SPI_slave_Test_Master_Side, this is created by summing the values of the send buffer, and then casting it as a uint16.
If this is correct, should it be possible to have the final data points as a series of 257* 255 which add up to 65535 thus fooling the checksum?
Cheers
Title: Re: FT4222H Checksum
Post by: FTDI Community on April 11, 2018, 02:32:51 PM
Hello,

As per the LibFT4222 User Guide, the Checksum is the summation of all data fields’ lower two bytes starting from the first byte, the sync word, to the latest data byte.

Is there any particular reason you wish to fool the checksum?

Best Regards,

FTDI Community
Title: Re: FT4222H Checksum
Post by: Cactus on May 31, 2018, 04:57:38 PM
Hi,
Sorry I hadn't seen I had a reply.
I was looking to fool the checksum as I was operating a fast time critical program on my microcontroller, and I didn't think the micro-controller had the capacity to sum the data fields in the given time, and hence was looking for work-arounds.
I was able to sort it out though, thanks for your help.
Cheers and thanks for your help.