MCRC module is used to perform CRC (Cyclic Redundancy check) to verify integrity of a memory system. The MCRC controller is used to calculate the signature for a set of data and then compare the calculated signature value against a predetermined good signature value. MCRC controller provides four channels to perform CRC calculation on multiple memories.
Features Supported
Each MCRC instance supports 4 channels. Each channel can be configured to operate in one of 3 modes
- Auto Mode: In this mode, the MCRC controller, in conjunction with DMA controller, can perform CRC totally without CPU intervention.
- Full Mode: In this mode, the CPU does the data patterns transfer and signature verification all by itself. CPU performs data patterns transfer by reading data from the memory system to the PSA signature register.
- Semi Mode: In this mode, DMA controller is used to perform data patterns transfer and signature verification.
Timeout is configured to generate timeout interrupt to ensure that the memory system is examined with predefined time frame and no loss of incoming data. A 24-bit counter per CRC channel is configured.
The module supports below API's for the application
- API to support and configure Full, Semi, and Auto MCRC mode
- API to support readback of static registers
- API to support readback of written configuration
- API to support interrupt configuration
SysConfig Features
Features NOT Supported
- No DMA mode examples for M4
Important Usage Guidelines
Example Usage
The following shows an example of SDL MCRC API usage by the application for Full CPU mode.
Include the below file to access the APIs
Initialize an MCRC instance and channel
Reset and configure the MCRC channel
Verify the configuration
if (result == SDL_PASS)
{
}
Compute the signature
SDL_MCRC_dataConfig_t mcrcData;
mcrcData.pMCRCData = (uint32_t *)testParams[testCase].sourceMemory;
mcrcData.size = testParams[testCase].dataSize;
Check the calculated signature
if ((sectSignVal.
regH == testParams[testCase].mcrcSignHigh) &&
(sectSignVal.
regL == testParams[testCase].mcrcSignLow))
{
result = SDL_PASS;
}
else {
result = SDL_EFAIL;
}
API
APIs for SDL MCRC