The following steps are performed by the PRU firmware to use the CRC module:
Step1: Configuration (optional)
- Configure CRC type:
For CRC32 operation, set CRC32_ENABLE using XOUT instruction with the following parameters:
- Device ID = 1
- Base register = R25
- Size = 1
- Update CRC_SEED, if required using XOUT with the following parameters:
- Device ID = 1
- Base register = R28
- Size = 1 to 4
Step 2:
- Load new CRC data into R29
- Push CRC data to the CRC16/32 module using XOUT with the following parameters:
- Device ID = 1
- Base register = R29
- Size = 1 to 4
- 1 or 2 NOPS
- Load the accumulated CRC result into the PRU using the XIN instruction with the following parameters:
- Device ID = 1
- Base register = R29
- Size = 4
Repeat Step 2, numbers 1 and 2 for each new CRC data.
Note: When a session starts, the PRU firmware must use the same write data width throughout the session.