I am having a fight with the SC589 EZ-KIT.
The evaluation version used is ADSP-SC589 EZ-Board, and the running routine is adc_dac_playback.problem: The program is to first submit the audio data collected by ADC to Buffers and then to DAC for output. I need to insert a signal processing algorithm or filter before submitting to DAC. I need to sample once and process once and then output, and I need to transfer the data It is converted into a 32-bit floating point number, and after processing, the data is converted into data that can be transmitted. In the current routine, the ProcessBuffers(void) function accumulates data that has been sampled multiple times for transmission. How do I configure it to transmit data once sampling once?
Looking forward to hearing from you.
Thanks in advance!
Please find the attached Example Audio playback project for SC-589 ezkit which de-interleave the received channel data from ADC 0, 1, 2, 3 into four buffers.
In the de-interleaved data, you can implement your algorithm. If this is not your requirement, can you please explain your issue in detail. This would be helpful for us to assist you better.
3225.ADC DAC Audio Playback (SC589 SHARC).zip
Thank you for your reply,I added an algorithm to process the sampled signal in uint32_t ProcessBuffers(void), and then output the result. But the output result is delayed. I want to eliminate or reduce the delay, but I don't know how to deal with it. As shown in the figure, the blue waveform represents the input, and the yellow represents the output. There is a phase difference between them (due to the delay). The result I want is that the blue waveform and the yellow waveform are inverted. Do you know how to achieve it ?Looking forward to your reply. Thank you!
We have tried to simulate the delay issue with the example project that we have shared to you. But we are getting the waveform correctly. Please refer the attached image.
Can you please try with the example project without your algorithm. If you are facing issue with your algorithm, please verify your code and share us your code is possible. This will help us to assist you further.
Best Regards,Santha kumari.K
thank you for your reply.I am running the source routine you gave me, and you can clearly see that it has a delay of 3.24ms. From your picture, we can only observe the phase difference, but the actual operation result is several function cycles plus the phase difference. I want to reduce the delay, what should I do?Looking forward to your reply.
Can you please try with enabling optimization and let us know how you gets on. The -Ov num (optimize for speed versus size) switch informs the compiler of the relative importance of speed versus size, when considering whether such trade-offs are worthwhile. The num variable should be an integer between 0 (purely size) and 100 (purely speed). The –Ov100 setting attempts to optimize purely for speed (and therefore inline a greater number of functions) whereas the -Ov0 setting attempts to optimize purely for space (and therefore inline fewer functions).
To enable optimization go to Project Options > Project > Compile > General > Select Enable optimization.Once enabled, the Optimize for code size/speed slider control becomes available.
We recommend to refer the below chapter in VisualDSP++ help:Help > Contents > Manuals > Software tool Manuals > SHARC C/C++ Compiler Manual > C/C++ Compiler Manual for SHARC® Processors > 2 Achieving Optimal Performance From C/C++ Source Code
Also please confirm that "Eliminate Unused Objects" is enabled in your project. This can be checked via Options > Project > Link > Eliminate > Eliminate Unused Objects.