PDA

View Full Version : EDMA transfer problem on C6711


Barry
08-31-2003, 09:34 PM
Hi,

I was wondering if you could help me sort out a problem I'm having
with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
Codec.

The problem is that when I use EDMA transfering, I'm losing every
second input and output sample. I have the sample rate set as 88200Hz,
but when I output a 1k signal, I get a 500Hz signal. When I input a
1kHz signal to the codec, I get 500 samples per cycle.

The problem is not related to the McBSP becuase I dont lose any
samples when I pole, instead of the EDMA transfer.

The AIC23 accepts the right and left channel as a 32 bit frame. In
otherwords the left and right channels are 16 bits each.

Another think I've noticed is that the right channel is clipped. If 1
output a signal with the maximum possible applitude, 1 Volts RMS, it
is clipped somewhere above and below 1 and -1 volts respectfully. This
does not happen to the left channel, and does not happen to either
channel when I use polling instead of EDMA transferring.

This is how I'm setting up the EDMA -

/* Config Structures */
EDMA_Config DSS_edmaMcbspRx = {
0x207D0000, /* Option */
0x30000000, /* Source Address - Numeric */
0x00000000, /* Transfer Counter - Numeric */
0x00000000, /* Destination Address - Numeric */
0x00000002, /* Index register - Numeric */
0x00000000 /* Element Count Reload and Link Address */
};

EDMA_Config DSS_edmaMcbspTx = {
0x431C0000, /* Option */
0x00000000, /* Source Address - Numeric */
0x00000000, /* Transfer Counter - Numeric */
0x30000000, /* Destination Address - Numeric */
0x00000002, /* Index register - Numeric */
0x00000000 /* Element Count Reload and Link Address */
};

I think the best thing is if I link to the code I'm using (.txt = .c)
-

http://baz.perlmonk.org/main.txt - contains main
http://baz.perlmonk.org/dss.txt - pipe interface to the serial port
audio
http://baz.perlmonk.org/dss_dsk6711.txt
http://baz.perlmonk.org/dss_edmacisr.txt - EDMA ISR

the cdb file -

http://baz.perlmonk.org/audio.cdb

The AIC23 Codec uses MCBSP 1 for control and MCBSP 0 for data
transfer. I've tried setting differenct sample rates on the AIC23, but
the EDMA transfer always seems to half my number of samples.

Can anyone see what I'm doing wrong, I've been stuck at this for a
while and I'd really like to get it fixed. Thanks for your help.

Barry.

When polling, I output a sine wave with the following -

for(i=0;i<80;i++)
sig[i] = cos(w(1102.5)*i/(Float)(SR));

EDMA_RSET(EER, 0x0000); /* Disable all events */
EDMA_RSET(ECR, 0xffff); /* Clear all pending events */
EDMA_RSET(CIER, 0x0000); /* Disable all events to Interrupt */
EDMA_RSET(CIPR, 0xffff); /* Clear all pending Queued EDMA ints */


MCBSP_RSETH(DSS_hMcbsp1, SPCR, 0x02001000);
MCBSP_RSETH(DSS_hMcbsp1, SPCR, 0x02C01000);
MCBSP_RSETH(DSS_hMcbsp1, SPCR, 0x02C11000);

MCBSP_RSETH(DSS_hMcbsp0, SPCR, 0x02010001);

initRegs();


for(;;)
for(i=0;i<80;i++)
{

f1=sig[i];
f2=sig[i];

t1 = f1 * div;
t1 &= 0xffff;

t2 = f2 * div;
t2 &= 0xffff;

t2 <<= 16;
t1 = t1 | t2;

spWrite(DSS_hMcbsp0, t1);
t1 = spRead(DSS_hMcbsp0);
/* t2 = (t1>>16) & 0xffff;
t1 = t1 &0xffff;

if(t1 & 0x8000)
t1 |= 0xFFFF0000;

if(t2 & 0x8000)
t2 |= 0xFFFF0000;

f1 = (((Float)((Int)(t1)))/div);
f2 = (((Float)((Int)(t2)))/div);*/

}
}

Uns spRead(MCBSP_Handle hMcBsp)
{

// Poll until new value ready to read
while (((MCBSP_RGETH(DSS_hMcbsp0, SPCR)) & 0x2) == 0);

return MCBSP_read(hMcBsp);
}

// Write from McBsp to AIC23
Void spWrite(MCBSP_Handle hMcBsp, Uns data)
{

// Poll until ready to transmit
while (( (MCBSP_RGETH(hMcBsp, SPCR)) & 0x20000) == 0);

MCBSP_write(hMcBsp,data);
}

Barry
09-03-2003, 11:20 AM
I still can't see what I'm doing wrong,

any suggestions anyone?

Thanks,

Barry.

[email protected] (Barry) wrote in message news:<[email protected]>...
> Hi,
>
> I was wondering if you could help me sort out a problem I'm having
> with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
> Codec.
>
> The problem is that when I use EDMA transfering, I'm losing every
> second input and output sample. I have the sample rate set as 88200Hz,
> but when I output a 1k signal, I get a 500Hz signal. When I input a
> 1kHz signal to the codec, I get 500 samples per cycle.
>
> The problem is not related to the McBSP becuase I dont lose any
> samples when I pole, instead of the EDMA transfer.
>
> The AIC23 accepts the right and left channel as a 32 bit frame. In
> otherwords the left and right channels are 16 bits each.
>
> Another think I've noticed is that the right channel is clipped. If 1
> output a signal with the maximum possible applitude, 1 Volts RMS, it
> is clipped somewhere above and below 1 and -1 volts respectfully. This
> does not happen to the left channel, and does not happen to either
> channel when I use polling instead of EDMA transferring.
>
> This is how I'm setting up the EDMA -
>
> /* Config Structures */
> EDMA_Config DSS_edmaMcbspRx = {
> 0x207D0000, /* Option */
> 0x30000000, /* Source Address - Numeric */
> 0x00000000, /* Transfer Counter - Numeric */
> 0x00000000, /* Destination Address - Numeric */
> 0x00000002, /* Index register - Numeric */
> 0x00000000 /* Element Count Reload and Link Address */
> };
>
> EDMA_Config DSS_edmaMcbspTx = {
> 0x431C0000, /* Option */
> 0x00000000, /* Source Address - Numeric */
> 0x00000000, /* Transfer Counter - Numeric */
> 0x30000000, /* Destination Address - Numeric */
> 0x00000002, /* Index register - Numeric */
> 0x00000000 /* Element Count Reload and Link Address */
> };
>
> I think the best thing is if I link to the code I'm using (.txt = .c)
> -
>
> http://baz.perlmonk.org/main.txt - contains main
> http://baz.perlmonk.org/dss.txt - pipe interface to the serial port
> audio
> http://baz.perlmonk.org/dss_dsk6711.txt
> http://baz.perlmonk.org/dss_edmacisr.txt - EDMA ISR
>
> the cdb file -
>
> http://baz.perlmonk.org/audio.cdb
>
> The AIC23 Codec uses MCBSP 1 for control and MCBSP 0 for data
> transfer. I've tried setting differenct sample rates on the AIC23, but
> the EDMA transfer always seems to half my number of samples.
>
> Can anyone see what I'm doing wrong, I've been stuck at this for a
> while and I'd really like to get it fixed. Thanks for your help.
>
> Barry.
>
> When polling, I output a sine wave with the following -
>
> for(i=0;i<80;i++)
> sig[i] = cos(w(1102.5)*i/(Float)(SR));
>
> EDMA_RSET(EER, 0x0000); /* Disable all events */
> EDMA_RSET(ECR, 0xffff); /* Clear all pending events */
> EDMA_RSET(CIER, 0x0000); /* Disable all events to Interrupt */
> EDMA_RSET(CIPR, 0xffff); /* Clear all pending Queued EDMA ints */
>
>
> MCBSP_RSETH(DSS_hMcbsp1, SPCR, 0x02001000);
> MCBSP_RSETH(DSS_hMcbsp1, SPCR, 0x02C01000);
> MCBSP_RSETH(DSS_hMcbsp1, SPCR, 0x02C11000);
>
> MCBSP_RSETH(DSS_hMcbsp0, SPCR, 0x02010001);
>
> initRegs();
>
>
> for(;;)
> for(i=0;i<80;i++)
> {
>
> f1=sig[i];
> f2=sig[i];
>
> t1 = f1 * div;
> t1 &= 0xffff;
>
> t2 = f2 * div;
> t2 &= 0xffff;
>
> t2 <<= 16;
> t1 = t1 | t2;
>
> spWrite(DSS_hMcbsp0, t1);
> t1 = spRead(DSS_hMcbsp0);
> /* t2 = (t1>>16) & 0xffff;
> t1 = t1 &0xffff;
>
> if(t1 & 0x8000)
> t1 |= 0xFFFF0000;
>
> if(t2 & 0x8000)
> t2 |= 0xFFFF0000;
>
> f1 = (((Float)((Int)(t1)))/div);
> f2 = (((Float)((Int)(t2)))/div);*/
>
> }
> }
>
> Uns spRead(MCBSP_Handle hMcBsp)
> {
>
> // Poll until new value ready to read
> while (((MCBSP_RGETH(DSS_hMcbsp0, SPCR)) & 0x2) == 0);
>
> return MCBSP_read(hMcBsp);
> }
>
> // Write from McBsp to AIC23
> Void spWrite(MCBSP_Handle hMcBsp, Uns data)
> {
>
> // Poll until ready to transmit
> while (( (MCBSP_RGETH(hMcBsp, SPCR)) & 0x20000) == 0);
>
> MCBSP_write(hMcBsp,data);
> }

Roger Larsson
09-03-2003, 08:36 PM
Barry wrote:

> Hi,
>
> I was wondering if you could help me sort out a problem I'm having
> with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
> Codec.
>
> The problem is that when I use EDMA transfering, I'm losing every
> second input and output sample. I have the sample rate set as 88200Hz,
> but when I output a 1k signal, I get a 500Hz signal. When I input a
> 1kHz signal to the codec, I get 500 samples per cycle.
>
> The problem is not related to the McBSP becuase I dont lose any
> samples when I pole, instead of the EDMA transfer.
>
> The AIC23 accepts the right and left channel as a 32 bit frame. In
> otherwords the left and right channels are 16 bits each.
>
> Another think I've noticed is that the right channel is clipped. If 1
> output a signal with the maximum possible applitude, 1 Volts RMS, it
> is clipped somewhere above and below 1 and -1 volts respectfully. This
> does not happen to the left channel, and does not happen to either
> channel when I use polling instead of EDMA transferring.
>
> This is how I'm setting up the EDMA -
>
> /* Config Structures */
> EDMA_Config DSS_edmaMcbspRx = {
> 0x207D0000, /* Option */
> 0x30000000, /* Source Address - Numeric */
> 0x00000000, /* Transfer Counter - Numeric */
> 0x00000000, /* Destination Address - Numeric */
> 0x00000002, /* Index register - Numeric */
> 0x00000000 /* Element Count Reload and Link Address */
> };
>
> EDMA_Config DSS_edmaMcbspTx = {
> 0x431C0000, /* Option */
> 0x00000000, /* Source Address - Numeric */
> 0x00000000, /* Transfer Counter - Numeric */
> 0x30000000, /* Destination Address - Numeric */
> 0x00000002, /* Index register - Numeric */
> 0x00000000 /* Element Count Reload and Link Address */
> };
>
> I think the best thing is if I link to the code I'm using (.txt = .c)
> -
>
> http://baz.perlmonk.org/main.txt - contains main
> http://baz.perlmonk.org/dss.txt - pipe interface to the serial port
> audio
> http://baz.perlmonk.org/dss_dsk6711.txt
> http://baz.perlmonk.org/dss_edmacisr.txt - EDMA ISR
>
> the cdb file -
>
> http://baz.perlmonk.org/audio.cdb
>
> The AIC23 Codec uses MCBSP 1 for control and MCBSP 0 for data
> transfer. I've tried setting differenct sample rates on the AIC23, but
> the EDMA transfer always seems to half my number of samples.
>
> Can anyone see what I'm doing wrong, I've been stuck at this for a
> while and I'd really like to get it fixed. Thanks for your help.
>
> Barry.
>

I do not have the manual handy. But can't the McBSP compress (remove) the
unused channel? Have you checked your recordings are half of the 32 bit
words non signal (noice, level)?

Anyway - you have to playback in the same way as you record.

/RogerL

--
Roger Larsson
Skellefteċ
Sweden

Robin Meichsner
09-04-2003, 07:31 AM
Hello Barry,

I don't have most experience in DSP stuff yet, but...

Some weeks ago I had similar effects with the audio daughter card (PCM3003
Audio Codec) offerd at ti.com. The solution was, that the given sampling
rate of 48kHz is splitted to both channels. In fact I can sample with 24kHz
per channel only. Frequencies higher than 12kHz can not be digitalized. I've
tested this with a software called "Audiotester". This is a spectrum
analyser working with the soundcard of your pc.
However...

Maybe this could solve your problem.

Greets, Robin



"Barry" <[email protected]> schrieb im Newsbeitrag
news:[email protected] om...
> Hi,
>
> I was wondering if you could help me sort out a problem I'm having
> with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
> Codec.
>

--- cut ---

Barry
09-04-2003, 12:24 PM
It works fine when I poll. That is, I while loop the values in XRDY
and RRDY, in the serial port config register. I think the problem is
related to how I'm imlementing my EDMA transfer.

Any other suggestions,

Thanks,

Barry

"Robin Meichsner" <[email protected]> wrote in message news:<[email protected]>...
> Hello Barry,
>
> I don't have most experience in DSP stuff yet, but...
>
> Some weeks ago I had similar effects with the audio daughter card (PCM3003
> Audio Codec) offerd at ti.com. The solution was, that the given sampling
> rate of 48kHz is splitted to both channels. In fact I can sample with 24kHz
> per channel only. Frequencies higher than 12kHz can not be digitalized. I've
> tested this with a software called "Audiotester". This is a spectrum
> analyser working with the soundcard of your pc.
> However...
>
> Maybe this could solve your problem.
>
> Greets, Robin
>
>
>
> "Barry" <[email protected]> schrieb im Newsbeitrag
> news:[email protected] om...
> > Hi,
> >
> > I was wondering if you could help me sort out a problem I'm having
> > with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
> > Codec.
> >
>
> --- cut ---

Barry
09-08-2003, 03:10 PM
Hi,

I'm still having issues with the above. I have managed to sort out the
clipping problem which was due to the fact that the codec was in
de-empishasis mode. This mode doesn't seem to function sensibly at
88.2kHz.

The AIC23EVM allows a number of sample rates, but each time I select
one I actually get half the required number of samples (for both the
dacs and adcs). In otherwords, if I set the codec for 88.2kHz, I
actually get 44.1kHz etc. This problem is related to either the edma
transfer or the pipe transfer. The reason I am sure of this is that
when I poll the values in McBSP's SPCR registers, instead of using
EDMA and PIPs, I get the correct sample rate. This is how I poll -

Uns spRead(MCBSP_Handle hMcBsp)
{

// Poll until new value ready to read
while (((MCBSP_RGETH(DSS_hMcbsp0, SPCR)) & 0x2) == 0);
return MCBSP_read(hMcBsp);
}

Void spWrite(MCBSP_Handle hMcBsp, Uns data)
{

// Poll until ready to transmit
while (( (MCBSP_RGETH(hMcBsp, SPCR)) & 0x20000) == 0);
MCBSP_write(hMcBsp,data);
}

for(;;)
{
spWrite(DSS_hMcbsp0, sampleOut);
sampleIn = spRead(DSS_hMcbsp0);
}

The code above allows me to work at the correct sample rate, but I can
alter this code and half my sample rate by doing two consecutive read
and/or two consecutive writes, for example -

for(;;)
{
spWrite(DSS_hMcbsp0, sampleOut);
spWrite(DSS_hMcbsp0, sampleOut);
sampleIn = spRead(DSS_hMcbsp0);
sampleIn = spRead(DSS_hMcbsp0);
}

Could this be the issue I'm having with my EDMA/PIP?

I've my EDMA set up to read from sourse address 0x00000000 when
transmitting, and to write to destination address 0x00000000 when
receiving. My EIX is 2.

My EDMA ISR is as follows -


Void DSS_edmaIsr(Void)
{
Int channel = EDMA_RGET(CIPR); /* get Channel Interrupt Pending
bits */

if (channel & DSS_RXDONE) { /* Channel = McBSP Buffer Rx'ed */
PIP_put(&DSS_rxPipe);
DSS_rxCnt = 0; /* Reset Buffer Count for sync */

EDMA_RSET(CIPR, DSS_RXDONE); /* Reset EDMA Channel Flag */
DSS_rxPrime(TRUE);
}

if (channel & DSS_TXDONE) { /* Channel = McBSP Buffer Tx'ed */
PIP_free(&DSS_txPipe);
DSS_txCnt = 0; /* Reset Buffer Count for sync */

EDMA_RSET(CIPR, DSS_TXDONE); /* Reset EDMA Channel Flag */
DSS_txPrime(TRUE);
}
}

How might I debug the above? That is, how might I check at this stage,
before I do any PIPing, that I have recieved the correct number of
samples? How do I check my destination address, 0x00000000, when
receiving. Watches wont work due to caching.

Thanks for your help,

Barry.


[email protected] (Barry) wrote in message news:<[email protected]>...
> It works fine when I poll. That is, I while loop the values in XRDY
> and RRDY, in the serial port config register. I think the problem is
> related to how I'm imlementing my EDMA transfer.
>
> Any other suggestions,
>
> Thanks,
>
> Barry
>
> "Robin Meichsner" <[email protected]> wrote in message news:<[email protected]>...
> > Hello Barry,
> >
> > I don't have most experience in DSP stuff yet, but...
> >
> > Some weeks ago I had similar effects with the audio daughter card (PCM3003
> > Audio Codec) offerd at ti.com. The solution was, that the given sampling
> > rate of 48kHz is splitted to both channels. In fact I can sample with 24kHz
> > per channel only. Frequencies higher than 12kHz can not be digitalized. I've
> > tested this with a software called "Audiotester". This is a spectrum
> > analyser working with the soundcard of your pc.
> > However...
> >
> > Maybe this could solve your problem.
> >
> > Greets, Robin
> >
> >
> >
> > "Barry" <[email protected]> schrieb im Newsbeitrag
> > news:[email protected] om...
> > > Hi,
> > >
> > > I was wondering if you could help me sort out a problem I'm having
> > > with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
> > > Codec.
> > >
> >
> > --- cut ---

Barry
09-09-2003, 05:56 PM
Any suggestions?

Thanks,

Barry.

[email protected] (Barry) wrote in message news:<[email protected]>...
> Hi,
>
> I'm still having issues with the above. I have managed to sort out the
> clipping problem which was due to the fact that the codec was in
> de-empishasis mode. This mode doesn't seem to function sensibly at
> 88.2kHz.
>
> The AIC23EVM allows a number of sample rates, but each time I select
> one I actually get half the required number of samples (for both the
> dacs and adcs). In otherwords, if I set the codec for 88.2kHz, I
> actually get 44.1kHz etc. This problem is related to either the edma
> transfer or the pipe transfer. The reason I am sure of this is that
> when I poll the values in McBSP's SPCR registers, instead of using
> EDMA and PIPs, I get the correct sample rate. This is how I poll -
>
> Uns spRead(MCBSP_Handle hMcBsp)
> {
>
> // Poll until new value ready to read
> while (((MCBSP_RGETH(DSS_hMcbsp0, SPCR)) & 0x2) == 0);
> return MCBSP_read(hMcBsp);
> }
>
> Void spWrite(MCBSP_Handle hMcBsp, Uns data)
> {
>
> // Poll until ready to transmit
> while (( (MCBSP_RGETH(hMcBsp, SPCR)) & 0x20000) == 0);
> MCBSP_write(hMcBsp,data);
> }
>
> for(;;)
> {
> spWrite(DSS_hMcbsp0, sampleOut);
> sampleIn = spRead(DSS_hMcbsp0);
> }
>
> The code above allows me to work at the correct sample rate, but I can
> alter this code and half my sample rate by doing two consecutive read
> and/or two consecutive writes, for example -
>
> for(;;)
> {
> spWrite(DSS_hMcbsp0, sampleOut);
> spWrite(DSS_hMcbsp0, sampleOut);
> sampleIn = spRead(DSS_hMcbsp0);
> sampleIn = spRead(DSS_hMcbsp0);
> }
>
> Could this be the issue I'm having with my EDMA/PIP?
>
> I've my EDMA set up to read from sourse address 0x00000000 when
> transmitting, and to write to destination address 0x00000000 when
> receiving. My EIX is 2.
>
> My EDMA ISR is as follows -
>
>
> Void DSS_edmaIsr(Void)
> {
> Int channel = EDMA_RGET(CIPR); /* get Channel Interrupt Pending
> bits */
>
> if (channel & DSS_RXDONE) { /* Channel = McBSP Buffer Rx'ed */
> PIP_put(&DSS_rxPipe);
> DSS_rxCnt = 0; /* Reset Buffer Count for sync */
>
> EDMA_RSET(CIPR, DSS_RXDONE); /* Reset EDMA Channel Flag */
> DSS_rxPrime(TRUE);
> }
>
> if (channel & DSS_TXDONE) { /* Channel = McBSP Buffer Tx'ed */
> PIP_free(&DSS_txPipe);
> DSS_txCnt = 0; /* Reset Buffer Count for sync */
>
> EDMA_RSET(CIPR, DSS_TXDONE); /* Reset EDMA Channel Flag */
> DSS_txPrime(TRUE);
> }
> }
>
> How might I debug the above? That is, how might I check at this stage,
> before I do any PIPing, that I have recieved the correct number of
> samples? How do I check my destination address, 0x00000000, when
> receiving. Watches wont work due to caching.
>
> Thanks for your help,
>
> Barry.
>
>
> [email protected] (Barry) wrote in message news:<[email protected]>...
> > It works fine when I poll. That is, I while loop the values in XRDY
> > and RRDY, in the serial port config register. I think the problem is
> > related to how I'm imlementing my EDMA transfer.
> >
> > Any other suggestions,
> >
> > Thanks,
> >
> > Barry
> >
> > "Robin Meichsner" <[email protected]> wrote in message news:<[email protected]>...
> > > Hello Barry,
> > >
> > > I don't have most experience in DSP stuff yet, but...
> > >
> > > Some weeks ago I had similar effects with the audio daughter card (PCM3003
> > > Audio Codec) offerd at ti.com. The solution was, that the given sampling
> > > rate of 48kHz is splitted to both channels. In fact I can sample with 24kHz
> > > per channel only. Frequencies higher than 12kHz can not be digitalized. I've
> > > tested this with a software called "Audiotester". This is a spectrum
> > > analyser working with the soundcard of your pc.
> > > However...
> > >
> > > Maybe this could solve your problem.
> > >
> > > Greets, Robin
> > >
> > >
> > >
> > > "Barry" <[email protected]> schrieb im Newsbeitrag
> > > news:[email protected] om...
> > > > Hi,
> > > >
> > > > I was wondering if you could help me sort out a problem I'm having
> > > > with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
> > > > Codec.
> > > >
> > >
> > > --- cut ---

Barry
09-09-2003, 05:56 PM
Any suggestions?

Thanks,

Barry.

[email protected] (Barry) wrote in message news:<[email protected]>...
> Hi,
>
> I'm still having issues with the above. I have managed to sort out the
> clipping problem which was due to the fact that the codec was in
> de-empishasis mode. This mode doesn't seem to function sensibly at
> 88.2kHz.
>
> The AIC23EVM allows a number of sample rates, but each time I select
> one I actually get half the required number of samples (for both the
> dacs and adcs). In otherwords, if I set the codec for 88.2kHz, I
> actually get 44.1kHz etc. This problem is related to either the edma
> transfer or the pipe transfer. The reason I am sure of this is that
> when I poll the values in McBSP's SPCR registers, instead of using
> EDMA and PIPs, I get the correct sample rate. This is how I poll -
>
> Uns spRead(MCBSP_Handle hMcBsp)
> {
>
> // Poll until new value ready to read
> while (((MCBSP_RGETH(DSS_hMcbsp0, SPCR)) & 0x2) == 0);
> return MCBSP_read(hMcBsp);
> }
>
> Void spWrite(MCBSP_Handle hMcBsp, Uns data)
> {
>
> // Poll until ready to transmit
> while (( (MCBSP_RGETH(hMcBsp, SPCR)) & 0x20000) == 0);
> MCBSP_write(hMcBsp,data);
> }
>
> for(;;)
> {
> spWrite(DSS_hMcbsp0, sampleOut);
> sampleIn = spRead(DSS_hMcbsp0);
> }
>
> The code above allows me to work at the correct sample rate, but I can
> alter this code and half my sample rate by doing two consecutive read
> and/or two consecutive writes, for example -
>
> for(;;)
> {
> spWrite(DSS_hMcbsp0, sampleOut);
> spWrite(DSS_hMcbsp0, sampleOut);
> sampleIn = spRead(DSS_hMcbsp0);
> sampleIn = spRead(DSS_hMcbsp0);
> }
>
> Could this be the issue I'm having with my EDMA/PIP?
>
> I've my EDMA set up to read from sourse address 0x00000000 when
> transmitting, and to write to destination address 0x00000000 when
> receiving. My EIX is 2.
>
> My EDMA ISR is as follows -
>
>
> Void DSS_edmaIsr(Void)
> {
> Int channel = EDMA_RGET(CIPR); /* get Channel Interrupt Pending
> bits */
>
> if (channel & DSS_RXDONE) { /* Channel = McBSP Buffer Rx'ed */
> PIP_put(&DSS_rxPipe);
> DSS_rxCnt = 0; /* Reset Buffer Count for sync */
>
> EDMA_RSET(CIPR, DSS_RXDONE); /* Reset EDMA Channel Flag */
> DSS_rxPrime(TRUE);
> }
>
> if (channel & DSS_TXDONE) { /* Channel = McBSP Buffer Tx'ed */
> PIP_free(&DSS_txPipe);
> DSS_txCnt = 0; /* Reset Buffer Count for sync */
>
> EDMA_RSET(CIPR, DSS_TXDONE); /* Reset EDMA Channel Flag */
> DSS_txPrime(TRUE);
> }
> }
>
> How might I debug the above? That is, how might I check at this stage,
> before I do any PIPing, that I have recieved the correct number of
> samples? How do I check my destination address, 0x00000000, when
> receiving. Watches wont work due to caching.
>
> Thanks for your help,
>
> Barry.
>
>
> [email protected] (Barry) wrote in message news:<[email protected]>...
> > It works fine when I poll. That is, I while loop the values in XRDY
> > and RRDY, in the serial port config register. I think the problem is
> > related to how I'm imlementing my EDMA transfer.
> >
> > Any other suggestions,
> >
> > Thanks,
> >
> > Barry
> >
> > "Robin Meichsner" <[email protected]> wrote in message news:<[email protected]>...
> > > Hello Barry,
> > >
> > > I don't have most experience in DSP stuff yet, but...
> > >
> > > Some weeks ago I had similar effects with the audio daughter card (PCM3003
> > > Audio Codec) offerd at ti.com. The solution was, that the given sampling
> > > rate of 48kHz is splitted to both channels. In fact I can sample with 24kHz
> > > per channel only. Frequencies higher than 12kHz can not be digitalized. I've
> > > tested this with a software called "Audiotester". This is a spectrum
> > > analyser working with the soundcard of your pc.
> > > However...
> > >
> > > Maybe this could solve your problem.
> > >
> > > Greets, Robin
> > >
> > >
> > >
> > > "Barry" <[email protected]> schrieb im Newsbeitrag
> > > news:[email protected] om...
> > > > Hi,
> > > >
> > > > I was wondering if you could help me sort out a problem I'm having
> > > > with my EDMA transfer. I'm working with the C6711DSK and the AIC23EVM
> > > > Codec.
> > > >
> > >
> > > --- cut ---