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.

AM62P: MCRC: several questions with auto-cpu mode

Part Number: AM62P

Hi,

I want to perform CRC with dataset read from flash via MCRC. The mode I choose is auto-cpu thus I am reading the tutorial "mcrc_auto" provided in MCU+SDK. I have several questions to ask.

(1). In the example, the pre-determined signature is composed of mcrcSignHigh and mcrcSignLow and each of this is 32-bit. I wonder does this means this example use CRC64 standard to calculate CRC. Additionally, I have noticed that TRM mentions the compressed value from PSA Signature Reg is always 64-bit. Thus I want to ask is CRC32 is supported? If so, how can I use CRC32 standard in MCRC?

screenshot-20260817-140304.png

(2). TRM mentions the data pattern could be configured as 8/16/32/64-bit but I didn't find any explicit variable declaration in software.screenshot-20260817-141714.png

Let's take "mcrc_auto" as an example, the source data buffer is uint8_t and mcrcPatternSize=4. My understanding is the data pattern size is configured as 32-bit in this scenario (4*8-bit). I want to double check whether the comprehension above is correct or not.

(3). In Section 12.8.3.2.2 MCRC General Operation, it mentions when a data pattern is written into PSA Signature Reg, a signature is generated; when a sector is writtern into PSA Signature Reg, a final signature is generated. My understanding is that the final signature for the sector is generated based on mutiple signatures for each data patterns; the signatures for data patterns is invisible for users and we only could access to signature for sector. Wanna check whether my comprehension is correct or not.
screenshot-20260817-143128.png

 

Regards,

Bomiao

  • . In the example, the pre-determined signature is composed of mcrcSignHigh and mcrcSignLow and each of this is 32-bit. I wonder does this means this example use CRC64 standard to calculate CRC

    Yes, the example uses CRC64. The mcrcSignHigh and mcrcSignLow fields together form a complete 64-bit signature 1. The AM62P MCRC module is exclusively a 64-bit CRC engine 

    (2). TRM mentions the data pattern could be configured as 8/16/32/64-bit but I didn't find any explicit variable declaration in software.

    In the SDL API, this is explicitly controlled through the dataBitSize field in the SDL_MCRC_DataConfig_t structure, which accepts values like SDL_MCRC_DATA_32_BIT 2. However, regardless of the pattern size you select (8/16/32/64-bit), the data is always padded with zeros to a full 64-bit write when sent to the PSA register

    Wanna check whether my comprehension is correct or not.

    Your comprehension is exactly right. The MCRC hardware generates intermediate signatures internally as each data pattern is fed into the PSA compression engine, but these per-pattern signatures are not accessible to you — they exist only within the LFSR state.

    Once an entire sector of data patterns completes, the final accumulated signature is copied to the PSA Sector Signature Register (MCRC64_0_PSA_SECSIGREGL/H), the PSA register is cleared, and that final sector signature is what you read and compare against your pre-computed reference

    Since you're reading data from flash, have you already determined how you'll pre-compute the reference 64-bit CRC signature offline (using the same polynomial and data pattern size) for comparison during verification?

    Regards,

    Nihar Potturu

  • Hi Nihar,

    (1). 

    The AM62P MCRC module is exclusively a 64-bit CRC engine

    My understanding is the MCRC controller of AM62P only be able to perform CRC64, CRC32 is not supported. Wanna check whether my comprehension is correct or not.
    (2). As we all know, the polynomial is a important element for CRC standard. Since MCRC supports CRC64 standard, I wonder whether the polynomial is hardware-fixed in MCRC and we don't have priority to modify it. 

    (3). 

    have you already determined how you'll pre-compute the reference 64-bit CRC signature offline

    In example "mcrc_auto" provided in SDK, it seems the 64-bit CRC signature could be generated via full-cpu mode along with MCRC controller. I want to ask do you have equivalent software algorithms compatible with this MCRC controller. In other words, can I generate a 64-bit CRC signature purely with software algorithms and this generated signature could be recognized by MCRC.

    Regards,

    Bomiao

  • My understanding is the MCRC controller of AM62P only be able to perform CRC64, CRC32 is not supported. Wanna check whether my comprehension is correct or not.

    Your understanding is correct.

    (2). As we all know, the polynomial is a important element for CRC standard. Since MCRC supports CRC64 standard, I wonder whether the polynomial is hardware-fixed in MCRC and we don't have priority to modify it. 

    Yes, the polynomial is HW fixed. 

    In other words, can I generate a 64-bit CRC signature purely with software algorithms and this generated signature could be recognized by MCRC.

    You can use the pycrc SW to generate the CRC values.There are various online tools as well for this. 

    https://github.com/tpircher/pycrc

    Regards,

    Nihar Potturu