Calculated CRC from FCE on the DMA data being transferred does not match with CRC in DMA register

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

cross mob
Kumaresh
Level 3
Level 3
10 questions asked 10 replies posted First solution authored
Hi,
 
I was trying to calculate DMA CRC but the calculated CRC from FCE does not match with CRC in DMA register.  Could pls look into the below query once you have time.
 
Question 1: How is the DMA checksum calculated in DMA_RDCRCR? I understand that CRC is being calculated for every DMA move but I am not clear on how these CRCs are being consolidated and represented in the RDCRC register. Could you please let me know if possible, on how the CRC calculated for DMA data transfer in Figure 1  ( Note : _dma​_1 is being transferred 1st )
I am using this webpage http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
 for CRC calculation
 
Some info on our DMA configuration is 
  1. BLKM = 4
  2. Transaction length = 0 i.e One transfer ( compressing 4 moves ) is One transaction
  3. No byte swapping and
  4. crc initial value is zero
 
Kumaresh_5-1665361063026.png

Figure 1 : Debugger capture of DMA data transfer and checksum captured at end of DMA transfer

 
Kumaresh_6-1665361083366.png
Figure 2 : Sample DMA move for the same dma channel with same configuration as above ( data is different from ones I used for calc in Fig 1 )

 

FCE configuration
 
Kumaresh_7-1665361100029.png
Figure 3 : FCE settings for IEEE 802.3 CRC32

 

When I used to compute the CRC from the above webpage unless I gave the input data in 32 bits format with padding, I am not able to get the correct CRC as in above figure 1 for the same DMA data in 16 bits without padding. Does it mean that I can only give 32-bit data for 32 bit CRC calculation.
 
Input data with additional padding Input data with no padding
 
Kumaresh_8-1665361117535.png

 

 
Kumaresh_9-1665361135867.png

 

CRC matches the calculated CRC from FCE as in Figure 1 CRC does not match with the calculated CRC from FCE
0 Likes
1 Solution
Nambi
Moderator
Moderator
Moderator
500 replies posted 50 likes received 5 likes given

Hi,

In FCE, the bit width of each word should be in terms of KERNEL polynomial width.

You would need to pad the 16-bit data.

Best Regards.

View solution in original post

0 Likes
4 Replies
Nambi
Moderator
Moderator
Moderator
500 replies posted 50 likes received 5 likes given

Hi,

1. Could you let us know the device being used?(eg: TC2xx, TC3xx)

2. You can refer to the following thread. https://community.infineon.com/t5/AURIX/How-is-the-CRC-calculated-with-the-DMA/td-p/316676

3. You can refer to the Aurix Development Studio example FCE_CRC_1_KIT_TC397_TFT

Best Regards.

0 Likes
Kumaresh
Level 3
Level 3
10 questions asked 10 replies posted First solution authored

Hi Nambi,

Thanks for sharing thread link but this one I already seen the data transfer is 32 Bit and for 32 Bit I can understand it. My question is for 16 bit ( data width ) how the checksum in dma computed.

We use TC37X.

0 Likes

Hi, I understood on how DMA CRC is being computed. May I know how to calculate 32 bit CRC for 16bit data width using FCE.

0 Likes
Nambi
Moderator
Moderator
Moderator
500 replies posted 50 likes received 5 likes given

Hi,

In FCE, the bit width of each word should be in terms of KERNEL polynomial width.

You would need to pad the 16-bit data.

Best Regards.

0 Likes