AnsweredAssumed Answered

Manipulate Talkthrough EZ-Kit example

Question asked by ramd on Jan 8, 2018
Latest reply on Jan 22, 2018 by ramd


I'm using SC589 processor. This question regards the EZ-Kit example:

"Using MCAPI/MDMA for ADSP-SC58x Dual-SHARC Audio Talkthrough" (EE-377)

I am trying to create an output sine wave on channel 0.

To do that I have added the following method:

void OutputSine()
int32_t SINE_WAVE[] = {0, 1296764, 2396107, 3130665, 3388607, 3130665, 2396107, 1296764, 0, -1296764, -2396107, -3130665, -3388607, -3130665, -2396107, -1296764};
int32_t *dacBuf_;

dacBuf_ = (int32_t *)&DacBuf[AUDIO_BUFFER_SIZE * 0u];

// Filling channel 0 on ping buffer
for(uint32_t i=0; i<64;i+=4)
*(dacBuf_ + i) = SINE_WAVE[ (i/4) % (SAMPLES_PER_PERIOD) ];

dacBuf_ = (int32_t *)&DacBuf[AUDIO_BUFFER_SIZE * 1u];

// Filling channel 0 on pong buffer
for(uint32_t i=0; i<64;i+=4)
*(dacBuf_ + i) = SINE_WAVE[ (i/4) % (SAMPLES_PER_PERIOD) ];

to the file Adau1962Interface.c on Core 2. Invoking the method from Adau1962aSubmitBuffers() (before the adi_adau1962a_SubmitBuffer invocation)

When probing with a scope I can't see an output sine wave.

When I probe the playback example (C:\Analog Devices\ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.0\ADSP-SC5xx_EZ-KIT\Examples\drivers\adc\adau1979\adc_dac_playback\SC589) (enabling the PLAYBACK mode) I can see a proper sine wave.

I couldn't figure out why the buffer (DacBuf) is triple ("ping, pong and a float") and not just double buffer like in the playback example
Thanks in advance,