I'm looking into the source of the EE 377 Audio Talkthrough example and I read in the paper:
The SPORT allocated to SHARC #2 is synchronized with the SPORT allocated to SHARC #1 during
initialization. After the MDMA completion interrupt occurs, SHARC #2 has almost one whole frame worth
of time before its SPORT callback function expects another frame.
I cannot find the part of the code that synchronizing SPORT of SHARC #2 to SPORT of SHARC #1. Can anyone point me to the part of code that ensures this synchronization is done? I've looked in Adau1962Interface.c file but couldn't find this.
The synchronization occurs in the code below. The DAC is enabled after the second SHARC receives the first audio packet from the first SHARC.
if( DacStarted == 0 && RXBuffersReceived > 0 )
// Enable audio output
DacStarted = 1;
// fprintf(stdout, "Core2: DAC Started\n" ); // EMG - 071116 - Removed to avoid sync issues