EmbDev.net

Forum: DSP tms320vc5505


von Tom X. (reynold522)


Rate this post
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
von Michael (Guest)


Rate this post
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

von Tom X. (reynold522)


Rate this post
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

von Michael (Guest)


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

http://c5505-ezdsp.googlecode.com/files/USB_Stick_AudioFilter1.zip

von Tom (Guest)


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

Tom

von Tom (Guest)


Rate this post
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

von Michael (Guest)


Rate this post
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!

von Tom (Guest)


Attached files:

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

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.