DSPRelated.com
Forums

Stop EDMA data from being sent continuously

Started by ruchi_tilwani February 22, 2005


Hi there,

I am sending data to McBSP thru EDMA. I am using linked buffers to do
this and this is working well. But I have disabled the EDMA in the
interrupt so that the next buffer data doesn't get transfered till i
have filled it up. Unfortunately this is not happening. The new data
starts getting transfered. The EDMA transfer stops after certain time
and then restarts. so I get transitions of 0's and 1's.

Can anyone help me out with this. How do i stop sending data in
between.

Thanks.





Hi,

I asume MCBSP is running nonstop with a fixed clock rate this means it
has to feed with data periodicaly. So I think the right way is not to
disable EDMA but to prepare the next data in time. Maybe you can try a
ping pong buffer with several samples to have some more time.

HTH Gustl ruchi_tilwani wrote:

>
>
> Hi there,
>
> I am sending data to McBSP thru EDMA. I am using linked buffers to do
> this and this is working well. But I have disabled the EDMA in the
> interrupt so that the next buffer data doesn't get transfered till i
> have filled it up. Unfortunately this is not happening. The new data
> starts getting transfered. The EDMA transfer stops after certain time
> and then restarts. so I get transitions of 0's and 1's.
>
> Can anyone help me out with this. How do i stop sending data in
> between.
>
> Thanks.





Ruchi,

Just wanted to know do you have printf statement in ISR? If you do,
try disabling it and see whether it behaves in the same manner.

Tarang On Tue, 22 Feb 2005 13:49:42 -0000, ruchi_tilwani
<> wrote:
>
>
> Hi there,
>
> I am sending data to McBSP thru EDMA. I am using linked buffers to do
> this and this is working well. But I have disabled the EDMA in the
> interrupt so that the next buffer data doesn't get transfered till i
> have filled it up. Unfortunately this is not happening. The new data
> starts getting transfered. The EDMA transfer stops after certain time
> and then restarts. so I get transitions of 0's and 1's.
>
> Can anyone help me out with this. How do i stop sending data in
> between.
>
> Thanks. >
>





Hi,

Tarang ...I am not using any printf statements but still the delay is there. That is probably because i switch off the EDMA and then start again.

I do have a nonstop fixed clock rate ....But i get data from a second EDMA so i cant be sure when i will get the data. Can you tell me when the interrupt is called exactly. I am sending out 16 bit data and I was assuming that it happens after CNT *16 bits are transfered? But this doesnt seem to be right.

Any other suggestions?

Thanks for the help.

>
>Hi,
>
>I asume MCBSP is running nonstop with a fixed clock rate this means it
>has to feed with data periodicaly. So I think the right way is not to
>disable EDMA but to prepare the next data in time. Maybe you can try a
>ping pong buffer with several samples to have some more time.
>
>HTH Gustl >ruchi_tilwani wrote:
>
>>
>>
>> Hi there,
>>
>> I am sending data to McBSP thru EDMA. I am using linked buffers to do
>> this and this is working well. But I have disabled the EDMA in the
>> interrupt so that the next buffer data doesn't get transfered till i
>> have filled it up. Unfortunately this is not happening. The new data
>> starts getting transfered. The EDMA transfer stops after certain time
>> and then restarts. so I get transitions of 0's and 1's.
>>
>> Can anyone help me out with this. How do i stop sending data in
>> between.
>>
>> Thanks.




Hi,

whats the source of your 2nd EDMA? I will call it RX EDMA. I asume it
has the same data rate as McBSP EDMA. I would suggest something like this:

RX EDMA -> inbuffer -> IRQ -> outbuffer -> McBSP EDMA

RX EDMA has 2 reload parameter sets. One filling the lower half of
inbuffer, the other filling the upper half of input buffer. The 1st
parameter set reload the 2nd and viceversa. The same for McBSP EDMA and
outbuffer. Each RX EDMA triggers an IRQ after half of the buffer is filled.

IRQ read the data from unused inbuffer half, processes it and writes it
to unused half of outbuffer. Which half of buffers is unused can be seen
on SRC/DST of the EDMAs.

Gustl

wrote:
>
>
> Hi,
>
> Tarang ...I am not using any printf statements but still the delay is
> there. That is probably because i switch off the EDMA and then start
> again.
>
> I do have a nonstop fixed clock rate ....But i get data from a second
> EDMA so i cant be sure when i will get the data. Can you tell me
> when the interrupt is called exactly. I am sending out 16 bit data
> and I was assuming that it happens after CNT *16 bits are transfered?
> But this doesnt seem to be right.
>
> Any other suggestions?
>
> Thanks for the help. >>
>>
>>
>>
>> Hi,
>>
>> I asume MCBSP is running nonstop with a fixed clock rate this means
>> it has to feed with data periodicaly. So I think the right way is
>> not to disable EDMA but to prepare the next data in time. Maybe you
>> can try a ping pong buffer with several samples to have some more
>> time.
>>
>> HTH Gustl
>>
>>
>> ruchi_tilwani wrote:
>>
>>
>>>
>>>
>>> Hi there,
>>>
>>> I am sending data to McBSP thru EDMA. I am using linked buffers
>>> to do this and this is working well. But I have disabled the EDMA
>>> in the interrupt so that the next buffer data doesn't get
>>> transfered till i have filled it up. Unfortunately this is not
>>> happening. The new data starts getting transfered. The EDMA
>>> transfer stops after certain time and then restarts. so I get
>>> transitions of 0's and 1's.
>>>
>>> Can anyone help me out with this. How do i stop sending data in
>>> between.
>>>
>>> Thanks.




Hi, Thanks for your help. It seems to be working well now. I removed the enabling and disabling of EDMAand make sure the data gets there in time. But the first few transitions are still not right. After about 4ms the data seems to be good.

Any suggestions?

>
>Hi,
>
>whats the source of your 2nd EDMA? I will call it RX EDMA. I asume it
>has the same data rate as McBSP EDMA. I would suggest something like this:
>
>RX EDMA -> inbuffer -> IRQ -> outbuffer -> McBSP EDMA
>
>RX EDMA has 2 reload parameter sets. One filling the lower half of
>inbuffer, the other filling the upper half of input buffer. The 1st
>parameter set reload the 2nd and viceversa. The same for McBSP EDMA and
>outbuffer. Each RX EDMA triggers an IRQ after half of the buffer is filled.
>
>IRQ read the data from unused inbuffer half, processes it and writes it
>to unused half of outbuffer. Which half of buffers is unused can be seen
>on SRC/DST of the EDMAs.
>
>Gustl
>
> wrote:
>>
>>
>> Hi,
>>
>> Tarang ...I am not using any printf statements but still the delay is
>> there. That is probably because i switch off the EDMA and then start
>> again.
>>
>> I do have a nonstop fixed clock rate ....But i get data from a second
>> EDMA so i cant be sure when i will get the data. Can you tell me
>> when the interrupt is called exactly. I am sending out 16 bit data
>> and I was assuming that it happens after CNT *16 bits are transfered?
>> But this doesnt seem to be right.
>>
>> Any other suggestions?
>>
>> Thanks for the help.
>>
>>
>>>
>>>
>>>
>>>
>>> Hi,
>>>
>>> I asume MCBSP is running nonstop with a fixed clock rate this means
>>> it has to feed with data periodicaly. So I think the right way is
>>> not to disable EDMA but to prepare the next data in time. Maybe you
>>> can try a ping pong buffer with several samples to have some more
>>> time.
>>>
>>> HTH Gustl
>>>
>>>
>>> ruchi_tilwani wrote:
>>>
>>>
>>>>
>>>>
>>>> Hi there,
>>>>
>>>> I am sending data to McBSP thru EDMA. I am using linked buffers
>>>> to do this and this is working well. But I have disabled the EDMA
>>>> in the interrupt so that the next buffer data doesn't get
>>>> transfered till i have filled it up. Unfortunately this is not
>>>> happening. The new data starts getting transfered. The EDMA
>>>> transfer stops after certain time and then restarts. so I get
>>>> transitions of 0's and 1's.
>>>>
>>>> Can anyone help me out with this. How do i stop sending data in
>>>> between.
>>>>
>>>> Thanks.



hi,

I don't know about your data rate and buffer size, but maybe EDMA and
IRQ works on the wrong buffer half at the beginning. It needs a cycle or
two to sync correct. check your buffer addresses when starting.

HTH

Gustl

wrote:

> Hi, Thanks for your help. It seems to be working well now. I removed
> the enabling and disabling of EDMAand make sure the data gets there
> in time. But the first few transitions are still not right. After
> about 4ms the data seems to be good.
>
> Any suggestions? >>
>>
>>
>>
>> Hi,
>>
>> whats the source of your 2nd EDMA? I will call it RX EDMA. I asume
>> it has the same data rate as McBSP EDMA. I would suggest something
>> like this:
>>
>> RX EDMA -> inbuffer -> IRQ -> outbuffer -> McBSP EDMA
>>
>> RX EDMA has 2 reload parameter sets. One filling the lower half of
>> inbuffer, the other filling the upper half of input buffer. The
>> 1st parameter set reload the 2nd and viceversa. The same for McBSP
>> EDMA and outbuffer. Each RX EDMA triggers an IRQ after half of the
>> buffer is filled.
>>
>> IRQ read the data from unused inbuffer half, processes it and
>> writes it to unused half of outbuffer. Which half of buffers is
>> unused can be seen on SRC/DST of the EDMAs.
>>
>> Gustl
>>
>> wrote:
>>
>>>
>>>
>>> Hi,
>>>
>>> Tarang ...I am not using any printf statements but still the
>>> delay is there. That is probably because i switch off the EDMA
>>> and then start again.
>>>
>>> I do have a nonstop fixed clock rate ....But i get data from a
>>> second EDMA so i cant be sure when i will get the data. Can you
>>> tell me when the interrupt is called exactly. I am sending out 16
>>> bit data and I was assuming that it happens after CNT *16 bits
>>> are transfered? But this doesnt seem to be right.
>>>
>>> Any other suggestions?
>>>
>>> Thanks for the help.
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I asume MCBSP is running nonstop with a fixed clock rate this
>>>> means it has to feed with data periodicaly. So I think the
>>>> right way is not to disable EDMA but to prepare the next data
>>>> in time. Maybe you can try a ping pong buffer with several
>>>> samples to have some more time.
>>>>
>>>> HTH Gustl
>>>>
>>>>
>>>> ruchi_tilwani wrote:
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> Hi there,
>>>>>
>>>>> I am sending data to McBSP thru EDMA. I am using linked
>>>>> buffers to do this and this is working well. But I have
>>>>> disabled the EDMA in the interrupt so that the next buffer
>>>>> data doesn't get transfered till i have filled it up.
>>>>> Unfortunately this is not happening. The new data starts
>>>>> getting transfered. The EDMA transfer stops after certain
>>>>> time and then restarts. so I get transitions of 0's and 1's.
>>>>>
>>>>>
>>>>> Can anyone help me out with this. How do i stop sending data
>>>>> in between.
>>>>>
>>>>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>>
> >
> NEW! You can now post a message or access and search the archives of
> this group on DSPRelated.com:
> http://www.dsprelated.com/groups/c6x/1.php
>
> _____________________________________ Note: If you do a simple
> "reply" with your email client, only the author of this message will
> receive your answer. You need to do a "reply all" if you want your
> answer to be distributed to the entire group.
>
> _____________________________________ About this discussion group:
>
> Archives: http://www.dsprelated.com/groups/c6x/1.php
>
> To Post: Send an email to
>
> Other DSP Related Groups: http://www.dsprelated.com/groups.php Yahoo!
> Groups Links >