Problems with project in technical note EE-268 (Programming Asynchronous Sample Rate Converters on ADSP-2136x) on ADSP-21369.
I started project “SRC SPORT0 to SPORT1” on ADSP-21369 (dspblok 21369zx). I have changed code for porting on ADSP21369 only by including files. But I have got output values in the negative and added ‘DTYPE1 bit’ in Sport1Init (). There are noises in output signal like this:
View output plot (FsOUT = FsIN)
I have no idea about it. Where is the mistake? Code listing below:
View code in main():
/Function Definitions --------------------------------------------------------------
//-----------------------------------------------------------------------------------
//Initialize SRC0
void SRC0Init()
{
*pSRCCTL0 = SRC0_SMODEIN0 | SRC0_SMODEOUT0 | SRC0_ENABLE ;
}
//-------------------------------------------------------
//-------------------------------------------------------
//Initialize SPORT0
void Sport0Init()
{
*pDIV0 = 0x0018000e;
*pSPCTL0 |= SPEN_A | SLEN24 | MSTR | OPMODE | SPTRAN;//SPORT0 configuration:
//Internal clock and word select
//I2S mode
//Transmitter
//Word length 24
}
//-------------------------------------------------------
//-------------------------------------------------------
//Initialize SPORT1
void Sport1Init()
{
*pDIV1 = 0x0018000e;
*pSPCTL1 |= SPEN_A | MSTR | SLEN24 | OPMODE | DTYPE1; //SPORT1 configuration:
//Internal clock and word select
//I2S mode
//Receiver
//Word length 24
}
View code in SPORT_0_1 and SRC0.c
// This function will setup the SRU Registers
void InitSRU()
{
// Enable pull-up resistors on unused DAI pins
* (volatile int *)DAI_PIN_PULLUP = 0xfffff;
//Generating Code for connecting : SPORT0_CLK to SRC0_CLK_IP
SRU (SPORT0_CLK_O, SRC0_CLK_IP_I);
//Generating Code for connecting : SPORT0_FS to SRC0_FS_IP
SRU (SPORT0_FS_O, SRC0_FS_IP_I);
//Generating Code for connecting : SPORT0_DA to SRC0_DAT_IP
SRU (SPORT0_DA_O, SRC0_DAT_IP_I);
//Generating Code for connecting : SPORT1_CLK to SRC0_CLK_OP
SRU (SPORT1_CLK_O, SRC0_CLK_OP_I);
//Generating Code for connecting : SPORT1_FS to SRC0_FS_OP
SRU (SPORT1_FS_O, SRC0_FS_OP_I);
//Generating Code for connecting : SRC0_DAT_OP to SPORT1_DA
SRU (SRC0_DAT_OP_O, SPORT1_DA_I);
}
Excuse me for my bad English.
Audio Signal Processors
processors and dsp
Processors and Microcontrollers
SHARC Audio Processors/SoCs
adsp-21369
Hi ,
I will check it and get back to you.
Thanks
Deepa
Hi, DeepV!
Thanks for your answer. I can't solve the problem. I need help.
Thanks ,
- Pol
27 сентября 2011, 13:16 от DeepV <analog@sgaur.hosted.jivesoftware.com>:
Analog Devices EngineerZone
Problems with project in technical note EE-268 (Programming Asynchronous Sample Rate Converters on ADSP-2136x) on ADSP-21369. reply from DeepV in Processors and DSP - View the full discussion
Hi,
The SPORT transmitter takes the lower 24 bits out of the 32 bit word. So, before seding out the data using SPORT, you might have to do little software manipulation to make sure that the sign bit of the data is preserved at the bit no 23. I am attaching a code which I tested on ADSP-21369 EZ-Kit sometime back. In this code, the SPORT1 sends the data (sine wave) to the SRC and the SPORT0 receives that data from the SRC. As you can see, the input data is adjusted by performing an airhtmetic shift before being sent out by the SPORT1 and the sign extension is enabled on the SPORT0.
Please try to modify your code accordingly and let ke know if the issue is still seen.
Hope this helps.
Thanks,
Mitesh
11 октября 2011, 09:32 от Mitesh Moonat <analog@sgaur.hosted.jivesoftware.com>:
Analog Devices EngineerZone
Problems with project in technical note EE-268 (Programming Asynchronous Sample Rate Converters on ADSP-2136x) on ADSP-21369. reply from Mitesh Moonat in Processors and DSP - View the full discussion
Hi,
Sorry but I couldn't see any description in your post. Could you please edit or re-post your reply?
Thanks,
Mitesh
18 октября 2011, 09:27 от Павел Куликов <pol_coolov@mail.ru>:
Hi Mitesh!
In the project in technical note EE-268 uses 32 bit (integer) positive words. Sign bit of the data agrees for the sign of data. I have done the arithmetic shift. Result is too. Does not ASRC interpret input data in true? Mitesh, thanks for your source code. I ask you to verify conversation on the smaller amplitude (200 – 500).
Hi Mitesh!
In the project in technical note EE-268 uses 32 bit (integer) positive words. Sign bit of the data agrees for the sign of data. I have done the arithmetic shift. Result is too. Does not ASRC interpret input data in true? Mitesh, thanks for your source code. I ask you to verify conversation on the smaller amplitude (200 – 500).
Hi,
Sorry, but I am not clear with the description and questions. Could you please elaborate more on what do you mean by "Result is too". Were you able to get the output correctly?
Also, what do you mean by: "Does not ASRC interpret input data in true?" and "I ask you to verify conversation on the smaller amplitude (200 – 500)".
Could you please elaborate?
Thanks,
Mitesh
Hi Mitesh!
I send my project in technical note EE-268. Input data (triangle wave) for transmit are positive and sign bit (№ 23) is zero (=0) for every part of the data. There are ‘input_data.dat’ and ‘output_data.dat’ and ‘output_data.jpg’ in the directory “Record data”. There are noises in output signal. I have no idea about it. Where is the mistake?
Hi Mitesh!
I send my project in technical note EE-268. Input data (triangle wave) for transmit are positive and sign bit (№ 23) is zero (=0) for every part of the data. There are ‘input_data.dat’ and ‘output_data.dat’ and ‘output_data.jpg’ in the directory “Record data”. There are noises in output signal. I have no idea about it. Where is the mistake?
Hi,
Thanks for posting the code. But, unfortunately, I couldn't extract the contents. It seems to be corrupted. Could you please re-post?
BTW, did you try the same code with a sine wave? Do you see the expected output with a sine wave at least?
Thanks,
Mitesh
Hi Mitesh!
I send files
Hi,
Not sure why but I am still not able to open these files. I get the following error while trying to unzip the files.
May be we can discuss this issue in our private support system. For that, I would request you to fill the details in the form available at the link below mentioning the link to this thread:
http://www.analog.com/en/content/technical_support_page/fca.html
Hope this helps.
Thanks,
Mitesh
Hi Mitesh!
I send files in unzipped
Hi,
Sorry, but I still couldn't open it. Could you please try sending them once throgh our private support system ?
Thanks,
Mitesh
This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.
Thank you,
EZ Admin
Please log in to reply.





