tms320vc5505

OP #1562393
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
Guest #1562450
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
Guest #1570644
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
Guest #1571728
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!

Reply

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.