Synchronization of 21065L SPORTs
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Synchronization of 21065L SPORTs

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
Jaime Andrés Aranguren Ca
Guest





Posted: Mon Dec 13, 2004 9:28 pm    Post subject: Synchronization of 21065L SPORTs Reply with quote

Hello,

I am using ADDS-21065L-EZLITE as the "signal generator" for testing the
project I am working on. I want to feed my DUT (device under test, another
ADDS-21065L-EZLITE) with both the analog version and the digital version of
the test data, generated with the 21065L.

The generated data is basically an AM modulated signal, with carrier at
60Hz, sampled at 8kHz.

I install the ISR for the SPORT1 like this:

/* Install SPORT1 TX Audio Processing Function */
interrupts (SIG_SPT1I, Sport1_Tx_ISR_Function);

The ISR is this:

void Sport1_Tx_ISR_Function()
{
unsigned int tmpSTCTL0;

Record_AD1819A_Audio_Input();

/* Call your C-DSP Audio Routines Here!! */

/* Generate test signals */
if (RX_right_flag == 1 && RX_left_flag == 1) {
ProcessOscillation ();

count1++;

tmpSTCTL0 = *pSTCTL0 & 0xC0000000;
if (tmpSTCTL0 == 0) {
// Send digitally out to SPORT0, TX_A
*pTX0_A = *(unsigned int*)(&Left_Channel_Out);

count0++;
}

RX_right_flag = 0; // clear right rx_flag
RX_left_flag = 0; // clear left rx_flag

}

Playback_Audio_Data();
}

This should be this way because of the tricks necessary to run the AD1819
with a sample rate different than 48kHz, data is available when both
RX_right_flag and RX_left_flag equal 1, which occurs every 125mS, giving a
sample rate of 8kHz. This way I send the analog version of the data out the
CODEC (AD1819). But I want to send the data in it's digital form, 32 bits,
over SPORT0 (SPORT1 is used for CODEC interfacing).

If I just write to TX0_A withouth checking the status of the TX buffer, I
get intermitent analog data, which can be heard with speakers connected to
the LINE_OUT of the EZLITE. This is because it's possible that I am writting
to a full or partially full TX buffer, so I wait till it's empty.

count0 and count1 help me to check how many samples are sent off SPORT1
(analog version via the CODEC, at 8kHz) and off SPORT0 (digital version, via
the SPORT0 pins, supposed to be at 8kHz too). After running for a while, I
get different values for count0 and count1, being count1 higher, which makes
me think that some samples are not being put off SPORT0, maybe because of
full or partially full buffer, but I can hear (and see with a scope) the
modualted analog output signal, which is good.

So what do you recommend me for synchonizing both SPORTs:
- Setting BHD (Buffer Hang Disable) in the SYSCON register?
- Blocking only for full TX0_A buffer, and allowing partially full buffer?
- Any other scheme?

Kindest regards,

--
Jaime Andrés Aranguren Cardona
jaac@nospam.sanjaac.com
SanJaaC Electronics
Soluciones en DSP
www.sanjaac.com

(Remove "nospam" from e-mail address)
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB