FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: FT4222H Checksum  (Read 9982 times)

Cactus

  • Newbie
  • *
  • Posts: 10
    • View Profile
FT4222H Checksum
« 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
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 891
    • View Profile
Re: FT4222H Checksum
« Reply #1 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
Logged

Cactus

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: FT4222H Checksum
« Reply #2 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.
Logged