DSPRelated.com
Forums

Timer and DMA with Interrupts.

Started by husnainalam April 15, 2002
Hello All,

I am using a TIGER31/PC board from DSP Research.What I am trying to
do is to calculate that how much faster data transfer rate is
achieved with DMA.

I am using the onchip timer for that.With every interupt timer
generates,I increment a CPU register.I plan to multiply this number
with the period of timer to calculate the time spent in DMA transfer.
In my routine first I run the timer and in the ISR for its interrupt
TINT0,I increment a register.Next I start the DMA to transfer a
certain block of data.In the ISR of the interrupt generated by the
DMA,when its TCINT bit is set,I halt the timer(Here I increment a
register too).

I have set the timer for maximum frequency with period register
initialized to zero and choosing clock mode.DMA is made to transfer
100 words.I am using Code Composer ver 1.56 from GO-DSP.I am using
the peripheral control library of TI which treats the peripherals as
Data structures.

When I run this code, the timer starts running when I halt the
program it is stuck in Timer's ISR,now if I single step,it comes out
of that ISR,and executes the next instructions till the end of the
program.The block of data DMA was supposed to transfer gets tranfered.
IF flag reads 0502h.IE flag reads 0500h.DMA interrupt is not serviced
as the specified register is not incremented.

Now I dont know what else should I do to make these two peripherals
work in synchronization and I am looking forward for any suggestions
from the learned members of this group.

Best Regards,

Husnain Alam,
DSP Engineer,
NUST,Rawalpindi,
Pakistan,



Hello Husnain

You did not say much about if the DMA started to transfer anything at all,
so this is a little difficult to analyze! Never the less, you should
probably be looking at both the CPU and DMA controler registers to determine
where the DMA is at the time you halt.

Never the less from your description it sounds like you have the CPU's TINT0
bit enabled (0x00000500) and not the DMA's TINT0 bit (0x05000000). The
bottom line is that the DMA is not firing because it sees no interrupt (but
the CPU does).

NOTE: Either the CPU or the DMA can service an interrupt. This is why there
is an upper and a lower field of mirrored bits in the IE register.

Best regards,
Keith
-------------------------------
At 05:30 AM 4/15/02 -0000, you wrote:
>Hello All,
>
>I am using a TIGER31/PC board from DSP Research.What I am trying to
>do is to calculate that how much faster data transfer rate is
>achieved with DMA.
>
>I am using the onchip timer for that.With every interupt timer
>generates,I increment a CPU register.I plan to multiply this number
>with the period of timer to calculate the time spent in DMA transfer.
>In my routine first I run the timer and in the ISR for its interrupt
>TINT0,I increment a register.Next I start the DMA to transfer a
>certain block of data.In the ISR of the interrupt generated by the
>DMA,when its TCINT bit is set,I halt the timer(Here I increment a
>register too).
>
>I have set the timer for maximum frequency with period register
>initialized to zero and choosing clock mode.DMA is made to transfer
>100 words.I am using Code Composer ver 1.56 from GO-DSP.I am using
>the peripheral control library of TI which treats the peripherals as
>Data structures.
>
>When I run this code, the timer starts running when I halt the
>program it is stuck in Timer's ISR,now if I single step,it comes out
>of that ISR,and executes the next instructions till the end of the
>program.The block of data DMA was supposed to transfer gets tranfered.
>IF flag reads 0502h.IE flag reads 0500h.DMA interrupt is not serviced
>as the specified register is not incremented.
>
>Now I dont know what else should I do to make these two peripherals
>work in synchronization and I am looking forward for any suggestions
>from the learned members of this group.
>
>Best Regards,
>
>Husnain Alam,
>DSP Engineer,
>NUST,Rawalpindi,
>Pakistan,
>
+-----------+
|Keith Larson |
|Member Group Technical Staff |
|Texas Instruments Incorporated |
| |
| 281-274-3288 |
| |
| www.micro.ti.com/~klarson |
|-----------+
| TMS320C3x/C4x/VC33 Applications |
| |
| TMS320VC33 |
| The lowest cost and lowest power 500 uw/mflop |
| floating point DSP on the planet! |
+-----------+