Hi, I have a project in CCS under windowsXPpro where I want to delay the execution of the processor but I can't find a suitable function for that. I try to use function Sleep from windows.h but then I get the: #error 'ERROR: Only Win32 target supported!' Can anyone help? greetz, Ger
Code Composer Studio..help!
Started by ●January 14, 2004
Reply by ●January 14, 20042004-01-14
On Wed, 14 Jan 2004 15:07:32 +0100, "Ger" <g.inberg@GEENSPAMstudent.utwente.nl> wrote in comp.dsp:> Hi, > > I have a project in CCS under windowsXPpro where I want to delay the > execution of the processor but I can't find a suitable function for that. > I try to use function Sleep from windows.h but then I get the: #error > 'ERROR: Only Win32 target supported!' > Can anyone help? > > greetz, > GerAre you trying to compile a call into a program to run on the DSP using a Windows system call? That is not possible. If you need a delay function, you should try writing one yourself. It can be a simple loop. The number of repeats of the loop is based on the total amount of the delay you want, and on the clock speed of your DSP. -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
Reply by ●January 15, 20042004-01-15
"Jack Klein" <jackklein@spamcop.net> wrote in message news:ej0c00lc0q2vhl6gj4ju7b4epjgpt86lp7@4ax.com...> On Wed, 14 Jan 2004 15:07:32 +0100, "Ger" > <g.inberg@GEENSPAMstudent.utwente.nl> wrote in comp.dsp: > > > Hi, > > > > I have a project in CCS under windowsXPpro where I want to delay the > > execution of the processor but I can't find a suitable function forthat.> > I try to use function Sleep from windows.h but then I get the: #error > > 'ERROR: Only Win32 target supported!' > > Can anyone help? > > > > greetz, > > Ger > > Are you trying to compile a call into a program to run on the DSP > using a Windows system call? That is not possible. If you need a > delay function, you should try writing one yourself. It can be a > simple loop. The number of repeats of the loop is based on the total > amount of the delay you want, and on the clock speed of your DSP. >Hi Jack, yes that's what I am trying. Isn't it strange that there isn't a function that waits a specific time and that you should write it yourself? The thing is that I send packages to another DSP and after I have send the message and want to wait some time cause otherwise the receiver can't handle it that fast. But ok I try your idea, maybe I just have to get into DSP programming:-) greetz, Ger
Reply by ●January 15, 20042004-01-15
"Ger" <g.inberg@geenspam.student.utwente.nl> wrote in message news:bu6dcl$rqq$1@ares.cs.utwente.nl...> > "Jack Klein" <jackklein@spamcop.net> wrote in message > news:ej0c00lc0q2vhl6gj4ju7b4epjgpt86lp7@4ax.com... > > On Wed, 14 Jan 2004 15:07:32 +0100, "Ger" > > <g.inberg@GEENSPAMstudent.utwente.nl> wrote in comp.dsp: > > > > > Hi, > > > > > > I have a project in CCS under windowsXPpro where I want to delay the > > > execution of the processor but I can't find a suitable function for > that. > > > I try to use function Sleep from windows.h but then I get the: #error > > > 'ERROR: Only Win32 target supported!' > > > Can anyone help? > > > > > > greetz, > > > Ger > > > > Are you trying to compile a call into a program to run on the DSP > > using a Windows system call? That is not possible. If you need a > > delay function, you should try writing one yourself. It can be a > > simple loop. The number of repeats of the loop is based on the total > > amount of the delay you want, and on the clock speed of your DSP. > > > Hi Jack, > > yes that's what I am trying. Isn't it strange that there isn't a function > that waits a specific time and that you should write it yourself? Thething> is that I send packages to another DSP and after I have send the messageand> want to wait some time cause otherwise the receiver can't handle it that > fast. > But ok I try your idea, maybe I just have to get into DSP programming:-) > > greetz, > Ger >Ger There is a function, but you would need to use the DSP/BIOS operating system on your code. The OS when in tasking mode provides a TSK_sleep(n) function, where n = milleseconds. An example of a simple DSP/BIOS program is probably found in the compiler. Good Luck Jeff
Reply by ●January 16, 20042004-01-16
"Kiebler" <kieblerfamily@comcastspamthis.net.com> wrote in message news:m62dnXHFxpitg5rdRVn-ug@comcast.com...> "Ger" <g.inberg@geenspam.student.utwente.nl> wrote in message > news:bu6dcl$rqq$1@ares.cs.utwente.nl... > > > > "Jack Klein" <jackklein@spamcop.net> wrote in message > > news:ej0c00lc0q2vhl6gj4ju7b4epjgpt86lp7@4ax.com... > > > On Wed, 14 Jan 2004 15:07:32 +0100, "Ger" > > > <g.inberg@GEENSPAMstudent.utwente.nl> wrote in comp.dsp: > > > > > > > Hi, > > > > > > > > I have a project in CCS under windowsXPpro where I want to delay the > > > > execution of the processor but I can't find a suitable function for > > that. > > > > I try to use function Sleep from windows.h but then I get the:#error> > > > 'ERROR: Only Win32 target supported!' > > > > Can anyone help? > > > > > > > > greetz, > > > > Ger > > > > > > Are you trying to compile a call into a program to run on the DSP > > > using a Windows system call? That is not possible. If you need a > > > delay function, you should try writing one yourself. It can be a > > > simple loop. The number of repeats of the loop is based on the total > > > amount of the delay you want, and on the clock speed of your DSP. > > > > > Hi Jack, > > > > yes that's what I am trying. Isn't it strange that there isn't afunction> > that waits a specific time and that you should write it yourself? The > thing > > is that I send packages to another DSP and after I have send the message > and > > want to wait some time cause otherwise the receiver can't handle it that > > fast. > > But ok I try your idea, maybe I just have to get into DSP programming:-) > > > > greetz, > > Ger > > > > > Ger > > There is a function, but you would need to use the DSP/BIOS operatingsystem> on your code. The OS when in tasking mode provides a TSK_sleep(n)function,> where n = milleseconds. > > An example of a simple DSP/BIOS program is probably found in the compiler. > > Good Luck > > JeffHi, how can I use the DSP/BIOS operating system? The function TSK_sleep(n) is highlighted in the source code but when I build the program it says : undefined first referenced symbol in file --------- ---------------- _TSK_sleep H:\inberg\source\uart.obj>> symbol referencing errors - robot.out not builtThe help function in code composer doesn't seem to know TSK or TSK_sleep... Any ideas how to solve this? greetz, Ger..feeling a real newbie
Reply by ●January 17, 20042004-01-17
"Ger" <g.inberg@GEENSPAMstudent.utwente.nl> wrote in message news:bu88bk$ndo$1@ares.cs.utwente.nl...> > "Kiebler" <kieblerfamily@comcastspamthis.net.com> wrote in message > news:m62dnXHFxpitg5rdRVn-ug@comcast.com... > > "Ger" <g.inberg@geenspam.student.utwente.nl> wrote in message > > news:bu6dcl$rqq$1@ares.cs.utwente.nl... > > > > > > "Jack Klein" <jackklein@spamcop.net> wrote in message > > > news:ej0c00lc0q2vhl6gj4ju7b4epjgpt86lp7@4ax.com... > > > > On Wed, 14 Jan 2004 15:07:32 +0100, "Ger" > > > > <g.inberg@GEENSPAMstudent.utwente.nl> wrote in comp.dsp: > > > > > > > > > Hi, > > > > > > > > > > I have a project in CCS under windowsXPpro where I want to delaythe> > > > > execution of the processor but I can't find a suitable functionfor> > > that. > > > > > I try to use function Sleep from windows.h but then I get the: > #error > > > > > 'ERROR: Only Win32 target supported!' > > > > > Can anyone help? > > > > > > > > > > greetz, > > > > > Ger > > > > > > > > Are you trying to compile a call into a program to run on the DSP > > > > using a Windows system call? That is not possible. If you need a > > > > delay function, you should try writing one yourself. It can be a > > > > simple loop. The number of repeats of the loop is based on thetotal> > > > amount of the delay you want, and on the clock speed of your DSP. > > > > > > > Hi Jack, > > > > > > yes that's what I am trying. Isn't it strange that there isn't a > function > > > that waits a specific time and that you should write it yourself? The > > thing > > > is that I send packages to another DSP and after I have send themessage> > and > > > want to wait some time cause otherwise the receiver can't handle itthat> > > fast. > > > But ok I try your idea, maybe I just have to get into DSPprogramming:-)> > > > > > greetz, > > > Ger > > > > > > > > > Ger > > > > There is a function, but you would need to use the DSP/BIOS operating > system > > on your code. The OS when in tasking mode provides a TSK_sleep(n) > function, > > where n = milleseconds. > > > > An example of a simple DSP/BIOS program is probably found in thecompiler.> > > > Good Luck > > > > Jeff > > Hi, > > how can I use the DSP/BIOS operating system? The function TSK_sleep(n) is > highlighted in the source code but when I build the program it says : > > undefined first referenced > symbol in file > --------- ---------------- > _TSK_sleep H:\inberg\source\uart.obj > >> symbol referencing errors - robot.out not built > > The help function in code composer doesn't seem to know TSK orTSK_sleep...> Any ideas how to solve this? > > greetz, > Ger..feeling a real newbie >Ger Well, I guess it is possible that you have a version of Code Composer Studio that does not include the DSP/BIOS operating system. One thing that I missed in your original post is that you do not mention what TI DSP (C6x, C5x, etc.) or what version of CCS you are using. Typically CCS has an examples directory that should have a program or two written using DSP/BIOS. If not you should be able to write a simple sleep function that does what you want. Basically, you should be able to write a simple function. void timed_sleep(unsigned int ms) { register unsigned int count = 0; unsigned int total; total = ms * NUMBER_OF_COUNTS_MS; while (count < total) { count += 1; } } You will need to calculate, based on the processor clock speed the NUMBER_OF_COUNTS_MS value. This should provide a delay, but may not be as accurate as you like. I may have something around here for a C64x running at 600MHz that I can scrounge up. Regards Jeff