Forums

Interrupt

Started by Nuwan Perera August 13, 2009
Dear all;

I have a program running on TMS320C6713 DSK. I need to create aninterruptto call a function in every 50 micro-second and come back to the place whereI was in the main program.

Is this DSP capable of doing it?

Ifpossible can you please give me some ideas.

Thank you

Nuwan

__________________________________________________
Hi Will,

Yes I am using one timertocontrolan ADC. Therefore I can use the other one for this purpose.

Thank you

Nuwan

--- On Thu, 8/13/09, William C Bonner wrote:
From: William C Bonner
Subject: Re: [c6x] Interrupt
To: n...@yahoo.com
Cc: c...
Date: Thursday, August 13, 2009, 1:16 PM
The standard way of doing this would be to use a timer to generate an interrupt. The 6713 has two timers, but their availability depends on the rest of your software environment, because you may already be using those timers for some other part of your process.

Wim.
On Thu, Aug 13, 2009 at 9:00 AM, Nuwan Perera wrote:


Dear all;

I have a program running on TMS320C6713 DSK. I need to create aninterruptto call a function in every 50 micro-second and come back to the place whereI was in the main program.

Is this DSP capable of doing it?

Ifpossible can you please give me some ideas.

Thank you

Nuwan
__________________________________________________
You can just following the INTC example in Chip Support Libary (CSL) .

Woody

Palmmicro mailing list -- http://groups.yahoo.com/group/palmmicro/
Voice and Video over IP BLOG -- http://aredfox.spaces.live.com/
MSN: w...@palmmicro.com
----- Original Message -----
From: Nuwan Perera
To: c...
Sent: Friday, August 14, 2009 12:00 AM
Subject: [c6x] Interrupt
Dear all;

I have a program running on TMS320C6713 DSK. I need to create an interrupt to call a function in every 50 micro-second and come back to the place where I was in the main program.

Is this DSP capable of doing it?

If possible can you please give me some ideas.

Thank you

Nuwan

__________________________________________________
The standard way of doing this would be to use a timer to generate an
interrupt. The 6713 has two timers, but their availability depends on the
rest of your software environment, because you may already be using those
timers for some other part of your process.

Wim.

On Thu, Aug 13, 2009 at 9:00 AM, Nuwan Perera wrote:

> Dear all;
>
> I have a program running on TMS320C6713 DSK. I need to create
> an interrupt to call a function in every 50 micro-second and come back to
> the place where I was in the main program.
>
> Is this DSP capable of doing it?
>
> If possible can you please give me some ideas.
>
> Thank you
>
> Nuwan
>
> __________________________________________________
>
I can not find this example in my CSL. Can you please send it to me if possible.

Thank you

Nuwan
--- On Thu, 8/13/09, Lin Rongrong wrote:
From: Lin Rongrong
Subject: Re: [c6x] Interrupt
To: n...@yahoo.com, c...
Date: Thursday, August 13, 2009, 12:34 PM

You can just following the INTC example in Chip Support Libary (CSL) .

Woody

Palmmicro mailing list -- http://groups.yahoo.com/group/palmmicro/
Voice and Video over IP BLOG -- http://aredfox.spaces.live.com/
MSN: w...@palmmicro.com

----- Original Message -----
From: Nuwan Perera
To: c...
Sent: Friday, August 14, 2009 12:00 AM
Subject: [c6x] Interrupt



Dear all;

I have a program running on TMS320C6713 DSK. I need to create aninterruptto call a function in every 50 micro-second and come back to the place whereI was in the main program.

Is this DSP capable of doing it?

Ifpossible can you please give me some ideas.

Thank you

Nuwan
____________ _________ _________ _________ _________ __
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail. yahoo.com

#yiv965983246 #ygrp-mkp {
BORDER-RIGHT:#d8d8d8 1px solid;PADDING-RIGHT:14px;BORDER-TOP:#d8d8d8 1px solid;PADDING-LEFT:14px;PADDING-BOTTOM:0px;MARGIN:14px 0px;BORDER-LEFT:#d8d8d8 1px solid;PADDING-TOP:0px;BORDER-BOTTOM:#d8d8d8 1px solid;FONT-FAMILY:Arial;}
#yiv965983246 #ygrp-mkp HR {
BORDER-RIGHT:#d8d8d8 1px solid;BORDER-TOP:#d8d8d8 1px solid;BORDER-LEFT:#d8d8d8 1px solid;BORDER-BOTTOM:#d8d8d8 1px solid;}
#yiv965983246 #ygrp-mkp #hd {
FONT-WEIGHT:bold;FONT-SIZE:85%;MARGIN:10px 0px;COLOR:#628c2a;LINE-HEIGHT:122%;}
#yiv965983246 #ygrp-mkp #ads {
MARGIN-BOTTOM:10px;}
#yiv965983246 #ygrp-mkp .ad {
PADDING-RIGHT:0px;PADDING-LEFT:0px;PADDING-BOTTOM:0px;PADDING-TOP:0px;}
#yiv965983246 #ygrp-mkp .ad A {
COLOR:#0000ff;TEXT-DECORATION:none;}
Nuwan,

On Thu, Aug 13, 2009 at 11:00 AM, Nuwan Perera wrote:
> Dear all;
>
> I have a program running on TMS320C6713 DSK. I need to create
> aninterruptto call a function in every 50 micro-second and come back to
> the place whereI was in the main program.
>
> Is this DSP capable of doing it?


Yes, but ... the success will depend upon the of headroom for your
current program and the complexity of your interrupt routine.

Conceptually, you will need to use the timer to trigger the interrupt.
One way to accomplish this is to use the following steps:
[Note there are quite a few references to 'timers' on 6211, 6711, 6713
devices in the archives - you can use any of them].
1. Put your current project aside. IMO, creating a simple timer
project, debugging it, and then integrating it into another project is
a much simpler process - especially for someone new to the C6713.
2. Create or locate a 'blink LED project'. Init counter, begin loop
forever,Turn on LED, poll counter for 500 ms, turn off LED poll
counter for 500ms, end loop forever.
3. Modify project for interrupts. Init the counter to generate an
interrupt each 500ms. Use forever loop to do nothing but increment a
variable [this serves no specific purpose except to give the loop
something to do]. Toggle a static variable in the ISR to determine LED
on/off on each pass.
4. When everything works, modify the counter time to 50usec. Run and
check with a scope - you should see a square ware on for 50us/off for
50us.
5. Integrate the debugged code into the original project.

mikedunn
>
> Ifpossible can you please give me some ideas.
>
> Thank you
>
> Nuwan
> __________________________________________________
>
>

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php

_____________________________________
Nuwan,

Assuming the DSP can handle that fast an event.

Set a timer to expire at the 50 microsecond rate and automatically reload.
Enable the interrupt for the timer.
Have the interrupt handler perform the function.

R. Williams

---------- Original Message -----------
From: Nuwan Perera
To: c...
Sent: Thu, 13 Aug 2009 09:00:22 -0700 (PDT)
Subject: [c6x] Interrupt

> Dear all;
>
> I have a program running on TMS320C6713 DSK. I need to create
> aninterruptto call a function in every 50 micro-second and come
> back to the place whereI was in the main program. Is this DSP
> capable of doing it? Ifpossible can you please give me some ideas.
> Thank you Nuwan
>
> __________________________________________________
>
------- End of Original Message -------

_____________________________________