This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2432: SORET_G, CRC check data path

Part Number: AM2432

[日本語]
 ■SORET_G,CRCチェックのデータパス
  受信CRCチェックのデータパスは下図でよろしいでしょうか。


  ※赤い所がCRCチェックになります。


[英語]
 ■SORET_G, CRC check data path

  Is the data path for receiving CRC check correct as shown below?



  *The red part is the CRC check.

  • SORTE_G CRC32 check is done in hardware in the MII_RT interface before the RX FIFOs. See: "6.4.11.2.2.4 Receive CRC Computation" in Technical Reference Manual.

    The receive CRC32 does not delay incoming packet and indicates output of comparison in single bit.

    There is additional CRC32 hardware with each PRU on AM243x/AM64x which can be used to calculate CRC16/32 over a subset of an Ethernet frame or other memory blocks. For the CRC16/32 widget the data needs to reside in PRU register. For example single instruction can be applied to calculate CRC over 32 bytes ranging from R2 to R9.

    Here is a code snippet:

    ; init CRC32 - set CRC32, default seed of 0xffffffff
    ; reference TRM 6.4.6.2.2.1 PRU and CRC16/32 Interface

         ldi32   r25, 1
         xout    CRC_ID, &r25, 4
         ldi32   r28, 0xffffffff
         xout    CRC_ID, &r28, 4

    ; start CRC32 block calculation r2-r9, 32 bytes
         xout    CRC_ID, &r2, 4

    ; takes 12 cycles before you can read the result

         xin     CRC_ID, &r29, 4

    The CRC16/32 widget is typically used for functional safety data validation of a subset of the payload or doing CRC over serial communication.

    You can also run the CRC widget over any memory block in the device by reading the memory using xfr2vbus widget and apply the CRC on PRU register space.