Module Operation
630
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Cyclic Redundancy Check (CRC) Controller Module
After system reset and when AUTO mode is enabled, CRC Controller automatically generates a DMA
request to request the pre-determined CRC value corresponding to the first sector of memory to be
checked.
In AUTO mode, when one sector of data patterns is compressed, the signature stored at the PSA
Signature Register is first copied to the PSA Sector Signature Register and PSA Signature Register is
then cleared out to all zeros. An automatic signature verification is then performed by comparing the
signature stored at the PSA Sector Signature Register to the CRC Value Register. After the comparison
the CRC Controller can generate a DMA request. Upon receiving the DMA request the DMA controller will
update the CRC Value Register by transferring the next pre-determined signature value associated with
the next sector of memory system. If the signature verification fails then CRC Controller can generate a
CRC fail interrupt.
In Full-CPU mode, no DMA request and interrupt are generated at all. The number of data patterns to be
compressed is determined by CPU itself. Full-CPU mode is useful when DMA controller is not available to
perform background data patterns transfer. The OS can periodically generate a software interrupt to CPU
and use CPU to accomplish data transfer and signature verification.
CRC Controller supports doubleword, word, half word and byte access to the PSA Signature Register.
During a non-doubleword write access, all unwritten byte lanes are padded with zero’s before
compression. Note that comparison between PSA Sector Signature Register and CRC Value Register is
always in 64 bit because a compressed value is always expressed in 64 bit.
There is a software reset per channel for PSA Signature Register. When set, the PSA Signature Register
is reset to all zeros.
PSA Signature Register is reset to zero under the following conditions:
•
System reset
•
PSA Software reset
•
One sector of data patterns are compressed
18.2.4 PSA Sector Signature Register
After one sector of data is compressed, the final resulting signature calculated by PSA Signature Register
is transferred to the PSA Sector Signature Register. PSA Signature Register is a read only register.
During Semi-CPU mode, the host CPU should read from the PSA Sector Signature Register instead of
reading from PSA Signature Register for signature verification to avoid data coherency issue. The PSA
Signature Register can be updated with new signature before the host CPU is able to retrieve it.
In Semi-CPU mode, no DMA request is generated. When one sector of data patterns is compressed, CRC
controller first generates a compression complete interrupt. Responding to the interrupt, CPU will in the
ISR read the PSA Sector Signature Register and compare it to the known good signature or write the
signature value to another memory location to build a signature file. In Semi-CPU mode, CPU must
perform the signature verification in a manner to prevent any overrun condition. The overrun condition
occurs when the compression complete interrupt is generated after one sector of data patterns is
compressed and CPU has not read from the PSA Sector Signature Register to perform necessary
signature verification before PSA Sector Signature Register is overridden with a new value. An overrun
interrupt can be enable to generate when overrun condition occurs. During Semi-CPU mode, the host
CPU should read from the PSA Sector Signature Register instead of reading from PSA Signature Register
for signature verification to avoid data coherency issue. The PSA Signature Register can be updated with
new signature before the host CPU is able to retrieve it.