ΣSigmaStudio Ask AI Русский Log in

Problems with project in technical note EE-268 (Programming Asynchronous Sample Rate Converters on ADSP-2136x) on ADSP-21369.

Processors & DSP pol Sep 27, 2011 00:00 16 replies Original on forum ↗
Thread Summary

Thread Summary

The user encountered negative output values and noise in the output signal when porting a project from 'SRC SPORT0 to SPORT1' on the ADSP-21369. The issue was resolved by ensuring the sign bit (bit 23) is preserved during data transmission and enabling sign extension on the SPORT0 receiver. The user was advised to perform an arithmetic shift on the input data and verify the output with a smaller amplitude signal.
AI Generated Content
Subscribe
pol Question
Sep 27, 2011 00:00

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

b5666365faa85c6cfddf586c881234da.jpg
b5666365faa85c6cfddf586c881234da.jpg
b5666365faa85c6cfddf586c881234da.jpg-677x171.jpg
b5666365faa85c6cfddf586c881234da.jpg-677x171.jpg
ADIApproved Reply
Sep 27, 2011 00:00

Hi ,

I will check it and get back to you.

Thanks

Deepa

pol Reply
Oct 4, 2011 00:00

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

ADIApproved Reply
Oct 11, 2011 00:00

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

pol Reply
Oct 18, 2011 00:00

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

ADIApproved Reply
Oct 18, 2011 00:00

Hi,

Sorry but I couldn't see any description in your post. Could you please edit or re-post your reply?

Thanks,

Mitesh

pol Reply
Oct 18, 2011 00:00

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).

pol Reply
Oct 18, 2011 00:00

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).

ADIApproved Reply
Oct 19, 2011 00:00

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

pol Reply
Oct 20, 2011 00:00

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?

7e3ea9e374e68987a9de171a7fa44b6b.jpg
7e3ea9e374e68987a9de171a7fa44b6b.jpg
7e3ea9e374e68987a9de171a7fa44b6b.jpg-450x118.jpg
7e3ea9e374e68987a9de171a7fa44b6b.jpg-450x118.jpg
pol Reply
Oct 20, 2011 00:00

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?

ADIApproved Reply
Oct 24, 2011 00:00

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

pol Reply
Oct 25, 2011 00:00

Hi Mitesh!

I send files

ADIApproved Reply
Oct 25, 2011 00:00

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

4d651488a38ed77aafbf5164fcf009d4.jpg
4d651488a38ed77aafbf5164fcf009d4.jpg
4d651488a38ed77aafbf5164fcf009d4.jpg-586x117.jpg
4d651488a38ed77aafbf5164fcf009d4.jpg-586x117.jpg
pol Reply
Oct 26, 2011 00:00

Hi Mitesh!

I send files in unzipped

ADIApproved Reply
Oct 27, 2011 00:00

Hi,

Sorry, but I still couldn't open it. Could you please try sending them once throgh our private support system ?

Thanks,

Mitesh

EZAdministrator Reply
Aug 2, 2018 00:00

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