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.

AM4379: CRC hardware in the PRU-ICSS?

Part Number: AM4379

Tool/software:

Online search results seem to indicate that the PRU-ICSS has hardware support for calculating some form CRC so that it need not be done in one of the PRU cores. However, I cannot find any source code that shows how to employ this supposed CRC hardware support. Can someone please confirm or refute this? If it is true, how can I obtain some sample code?

Thank you!

  • Hello Chuan,

    There is support for CRC in the PRU subsystem. Please refer to the Technical Reference Manual (TRM), section PRU > "CRC16/32".

    It looks like this is intended for use with PRU Ethernet firmware, as per section PRU > "MII_RT".

    What is your expected usecase?

    Regards,

    Nick

  • Hi Nick Saulnier,

    Thank you for replying and pointing out the useful documents to search.

    I see that CRC is indeed used as part of MII_RT, but section 30.4.1.4 appears to describe using "a designated CRC16/32 module" not in the context of the MII.  It talks about using the XIN and XOUT instructions.  Are there examples of doing this in some sample C code?

    The use case is protecting the integrity of long streams of data being sent and received via serial line.  It costs quite a bit of storage and CPU cycles to do CRC in software.  The "CRC16/32 module" referred to in 30.4.1.4 might be useful for this purpose if there is some sample C code.

    Thank you!

    Chuan Lee

  • Hello Chuan Lee,

    Is this serial line controlled by the PRU cores, or Linux?

    I am asking some other team members if they have any sample code around this. If they have sample code, I would expect it to be in assembly, but you can still create a mixed C and assembly project if needed. See the PRU Getting Started Labs > Lab 2 for more information on how to do that:
    https://software-dl.ti.com/processor-sdk-linux/esd/AM437X/09_03_05_02/exports/docs/common/PRU-ICSS/PRU-Getting-Started-Labs.html

    I will be on vacation next week. Feel free to ping the thread on June 2 or June 3 if you have not received any additional replies from me or the team.

    Regards,

    Nick

  • Hi Nick Saulnier,

    Thank you for the additional info.

    Yes, the serial line is one that is controlled by the PRU core.  I am not using Linux.

    Yes, I do understand that using mixed C and assembly would probably work.  I thought it was worth checking if there is special support in the PRU C compiler for the XIN/XOUT instructions mentioned in the TRM.

    Thanks again!

    Chuan Lee