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,

Thus the below highlighted text mean that DMA CRC has to be calculated by FCE and appended to the data stream by software.

Kumaresh_0-1662599450557.png

Thanks,

Kumaresh

0 Likes
1 Solution
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

Hi Kumaresh,

From my understanding, it is to generate the CRC for DMA data moved by ME and save it in RDCRC position. And the software should calculate CRC itself, and compare it with RDCRC position.

dw

View solution in original post

0 Likes
7 Replies
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

Hi Kumaresh,

Please refer to 18.3.4.10 DMA Data Checksum in the user manual of TC3xx.

 

18.3.4.10 DMA Data Checksum
To support enhanced data integrity checking the DMA calculates a 32-bit Read Data Cyclic Redundancy Checksum (RDCRC) in accordance with the IEEE 802.3 standard on DMA move data as it is passes through the DMA.
Move Operation or Shadow Operation
To calculate a DMA Data Checksum for DMA move data the DMA channel RDCRCR must be initialized (e.g. written with 00000000H or another desired initial value) in addition to the standard DMA transaction configuration (source address, etc.) for the size of DMA move data.
If no error or retry event is reported during DMA move then the ME calculates an updated DMA Data Checksum value for each DMA move. On completion of the DMA transaction the ME stores the DMA Data Checksum in the DMA channel RDCRCR. Software may compare the calculated DMA Data Checksum with an expected DMA Data Checksum to verify the integrity of DMA move data.

 

Please refer to 18.3.4 DMA Random Access Memory for RDCRCR position in the RAM.

Software stores a DMA channel TCS (at Figure 198) in the DMARAM to define the move function of each DMA
channel.

dw_0-1662603017962.png

 

dw

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

Hi,

In section 18.3.4.10 " Software may compare the calculated DMA Data Checksum with an expected DMA Data Checksum to verify the integrity of DMA move data ". Does the calculated DMA Data Cheksum refer to RDCRC register and expected DMA Data Checksum means what you shared above DMARAM.

Our understanding on the Safety Manual was to generate the CRC for DMA data stream from FCE and compare it with RDCRC register. Is our interpretation correct ?

Thanks

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

Hi Kumaresh,

From my understanding, it is to generate the CRC for DMA data moved by ME and save it in RDCRC position. And the software should calculate CRC itself, and compare it with RDCRC position.

dw

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

Hello,

I was trying to calculate CRC from DMA transfer but the result is not mactching with RDCRC.

Below is the way I do it. Could you pls correct me on what went wrong ?

For testing purpose I am transferring only one uint16 data with BLKM, Transfer len as 1. So for our case one move is one transfer and one transaction. And for CRC calculation I am using FCE below is the settings :

  1. FCE_CLC = 0x0
  2. FCE_CFG0 = 0xF00
  3. FCE_CRC0.U = 0x00000000
  4. data_ptr = (uint16 *)(0x70000000);
  5. FCE_IR0.U = *data_ptr
  6. crc_result = TWOS_COMPEMENTx(FCE_IR0.U)

Also, how to append the CRC data within the DMA move.

 

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

Hi Kumaresh,

What I can provide is below:

1 DMA calculates the internally the CRC over data and address, the FCE is not needed.

2. it is required to compare the CRC calculated by the DMA with an expected one.

dw

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

Hi,

I am clear on the Point #1. Regarding Point #2 do I need to compute CRC on my own and verify with internally calculated CRC from DMA ? In otherwords my question is how to calculate expected CRC. I am not able to find this in manual.

The background for this activity is I need to achieve below safety mechanism.

Kumaresh_0-1662692756323.png

 

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

Hi Kumaresh,

For CRC32 algorithm, you could search on Internet for C language implementation.

Here is for your reference, but note that it may not be a direct solution maybe need your modification or do some research.

Compiled under Embarcadero Dev-C++6.3

dw_0-1662695614272.png

 

dw

0 Likes