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

LED Driver ICs Forum Discussions

knieriem
Level 1
First reply posted 5 sign-ins First question asked
Level 1

Hello,

I'm writing code for communicating with a TLD7002 for a development tool, and would like to ask a few questions concerning the calculation of the CRC sums. As the driver library is not yet available to me, I'm implementing basic access to the HSLI in the programming language I'm using.

The datasheet of the TLD7002-16ES specifies two types of CRC algorithms, a 3-bit CRC, and an 8-bit CRC.

 

1. Regarding the 3-bit CRC, in the software design training video there appears a step where the crc value is reflected (mirrored) after processing the first 5 bits:

 

/* get reflected CRC3 value */
crc = TLD7002_MIRROR_MID_CRC3[crc];

 

I cannot find this step in the datasheet on page 67, though — an extra step reflecting the crc value after the first 5 bits and the tail 8 bits is not mentioned there; is the datasheet correct regarding the calculation of the 3-bit CRC?

 

2. The CRC-8 is defined as using the generator polynomial "0x8e = x^8 +x^4 +x^3 +x^2 +1" from CRC-8-AUTOSAR and SAE J1850.
But, from my understanding, 0x8E — binary: (1)-1000-1110 — actually is not the same as x⁸ + x⁴ + x³ + x² + 1;
0x8E is the reversed — LSB-first — form of 0x71  (1)-0111-0001, which corresponds to the polynomial x⁸ + x⁶ + x⁵ + x⁴ + 1, and is the reciprocal form, or Koopman representation, of the CRC-8-SAE polynomial 0x1D, but with similar properties:

Screenshot from 2022-08-08 09-50-25.png
(Source: Wikipedia)

So if the polynomial actually is 0x8E, then for calculating the CRC-8 of the safety byte the reversed, LSB first, algorithm would have to be used. Is this correct?
If yes, then this possibly also applies to the CRC-3, because two CRC sums used in the same HSLI frame are likely implemented in the same fashion. This could mean that the polynomial to be used when calculating the CRC-3 would be 0x6 ("reversed"), or 0x5 ("reversed reciprocal"), but not 0x3. Which one is actually used by the TLD7002-16ES?

The CRC-8 of SAEJ1850, by the way, also defines a final XOR step, where 0xFF is XOR'ed into the crc value. I suppose, since the datasheet of the TLD7002-16ES does not mention this, this final step of the original SAEJ1850 definition does not need to be performed in case of HSLI?

 

It could probably be helpful, if a table of example CRC results for various input values would be included in the datasheet, similarly as it is done in the Autosar document Specification of CRC Routines; this way users could perform a test for plausibility of their crc implementations, before sending actual requests to the TLD7002. 

 

Regards,
Michael

0 Likes
1 Solution
Kumarkanahai
Moderator
Moderator 50 replies posted First like given 100 sign-ins
Moderator

Hi @knieriem 

You can get the driver library of TLD7002-16ES from the below-mentioned link.
https://softwaretools.infineon.com/tools/com.ifx.tb.tool.tld700216esdevicedriver 
The driver of TLD7002-16ES is available in source form.

Thanks for your suggestion regarding CRC-3.We have taken this point into consideration.

Best Regards,
Kanahaiya


View solution in original post

0 Likes
4 Replies
Raj_JC
Moderator
Moderator 250 sign-ins 25 likes received 50 solutions authored
Moderator

Hi @knieriem,

1) As provided in the software design training video, the CRC-3 will be taken care of by the internal driver and the user need not change anything for this.
2) For CRC-8 the value 0x8E is a typo and the system follows standard CRC-8-AUTOSAR and SAE J1850.

Please, let us know if you need further support.

Thank you

Best Regards

Raj Chaudhari

0 Likes
knieriem
Level 1
First reply posted 5 sign-ins First question asked
Level 1

Hi @Raj_JC,

thank you for your quick response.
It appears to me that the driver library is not available yet at the website (if I have not missed it), possibly because the TLD7002 is still new. Can you tell, approximately, when the library will be available? Then I could explain to my clients, when we will be able to proceed. Will it be accessible in binary, or source form?

I would appreciate it, though, if the additional details regarding CRC-3 would be included in the datasheet at some point, as it would allow developers to send frames just based on the documentation in the datasheet.

Regards,
Michael

0 Likes
Kumarkanahai
Moderator
Moderator 50 replies posted First like given 100 sign-ins
Moderator

Hi @knieriem 

You can get the driver library of TLD7002-16ES from the below-mentioned link.
https://softwaretools.infineon.com/tools/com.ifx.tb.tool.tld700216esdevicedriver 
The driver of TLD7002-16ES is available in source form.

Thanks for your suggestion regarding CRC-3.We have taken this point into consideration.

Best Regards,
Kanahaiya


0 Likes
knieriem
Level 1
First reply posted 5 sign-ins First question asked
Level 1

Hi @Kumarkanahai,

thank you for providing the link to the library; I must have missed it when looking for it recently.
I now understand how to calculate the CRC-3, even without the tables provided.

Regards,
Michael

0 Likes