Click here to return to the Basic DSP section.
This module can be used for detecting and transmission error happened while writing the PM, DM0, DM1 data packs from the uC to the SigmaDSP.
SigmaStudio computes 'Expected' checksum value and displays in the schematic. The SigmaDSP initialization routine computes the actual checksum and stores in the target before the audio processing starts. By clicking the 'read' button, the actual values can be read from the target and displayed in the module. If the circle color is red the computation is still in progress. The green color indicates the computation is completed.
The checksum is calculated for each pack as follows,
initialize the sum to zero FOR each word in the pack Read each word in the pack Set sum equal to the addition of the each word END FOR Assign the negative sum to checksum result
Note:- For DM0 memory checksum is calculated by excluding the stack memory.
After writing all the download data as per the ADAU145x/ADAU146x download sequence, follow the steps below to verify the DM0, DM1 and PM packs.
byte spidata[datalength]; // pack data int64 sum = 0; int32 checksumresult; for(int i = 0; i < datalength/4; i++) { int data = 0; data = spidata[4 * i + 3]; data = data | (spidata[4 * i + 2] << 8); data = data | (spidata[4 * i + 1] << 16); data = data | (spidata[4 * i] << 24); sum += data; } checksumresult = -sum;
1. ADAU145x
2. ADAU146x