EmbDev.net

Forum: DSP tms320vc5505


Author: Tom Xie (reynold522)
Posted on:

Rate this post
0 useful
not useful
i want to output a sync signal which has 1s period. and i used timer for 
the time controling, now i encount the output problem, if i use such 
kind of expression >
if gpio1==0
write gpio1=1
else
write gpio1==0
end
then it will occupy the cpu, and the output sync will not be exactly 1s, 
so i dont know that if your guys have better way to change the output 
logic lever every 1 second

: Moved by Admin
Author: Michael (Guest)
Posted on:

Rate this post
0 useful
not useful
Are you using a timer interrupt, i.e. is your sample code above called 
from within the interrupt service routine?

Furthermore, are you using the eZdspC5505 USB stick from TI? If so, you 
might have a look at the adaptive filter example. In this example, the 
XF bit (which is connected to the LED of the board) is toggled via the 
timer. You can find the adaptive filter example somewhere on the TI site 
(under google code base or something like that - I can provide you with 
the correct link if you need it, but currently the TI site seems to be 
down, so I can't check where the project is, exactly).

Furthermore, it is a bit difficult to find out what you want to do. 
Perhaps you could include your code in the next post, or simply describe 
your project a bit more precisely.

Cheers and regards,
Michael

Author: Tom Xie (reynold522)
Posted on:

Rate this post
0 useful
not useful
first, thanks, that is definite not the sample code which i write in 
composer, it is just a logic expression, i will look for the project in 
Ti's website


cheers and regards

Tom

Author: Michael (Guest)
Posted on:

Rate this post
0 useful
not useful
Found that link to that audio filter example:

http://c5505-ezdsp.googlecode.com/files/USB_Stick_...

Author: Tom (Guest)
Posted on:

Rate this post
0 useful
not useful
danke sehr , thanks a lot for the help

Tom

Author: Tom (Guest)
Posted on:

Rate this post
0 useful
not useful
I have a further question, my timer works fine now, but there are still 
some other problem, i want timer output retanguler signal for the period 
of 1s, but my timer only interrupt for the first time, then doing 
nothing, i set the timer as autoload, and IRQ_clear after the interrupt 
of the timer, so i wana know that if there are any other thing can cause 
timer only load the period number for the first time

Author: Michael (Guest)
Posted on:

Rate this post
0 useful
not useful
If your interupt is generated once but then never again, try this:

Add

    CSL_FINST(CSL_RTC_REGS->RTCINTFL, RTC_RTCINTFL_SECFL, SET);

to your interrupt callback function.

This macro is defined in cslr.h, which is included automatically when 
you include e.g. csl.h. It writes a 1 to the flag for a "second" 
interrupt (of course only if your interrupt is a periodic interrupt 
which occurs every second - if not, you need to adapt that macro).

Have a look at csl_rtc_example.c (from an example project which is 
included in the csl folder) to see the mentioned code in an actual 
prgram.

Let me know if that helped!

Author: Tom (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
thanks for your answer
in my case,i use timer to output the pulse, and i attched my c file 
here.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.