Re: [ECOS] Re: Periodic execution of code in a thread context

2009-09-23 Thread Jonathan Larmour
John Dallaway wrote: Steven Clugston wrote: I need to have a function with some control code in it to execute at regular and consistent intervals. The way I've done this is just to create a thread and trap the execution path in an infinite loop using while(1){some code;cyg_thread_delay()} or for

[ECOS] RE: Periodic execution of code in a thread context

2009-09-23 Thread Steven Clugston
>> The other way I've tried is to use a timer/alarm attached to the system >> clock, but this executes in a DSR context which causes some limitations >> and I would prefer to use a normal thread context. >> >> Could I use a cyg_thread_suspend() at the end of each iteration then >> re-wake the thre

[ECOS] Re: Periodic execution of code in a thread context

2009-09-23 Thread John Dallaway
Hi Steven Steven Clugston wrote: > I need to have a function with some control code in it to execute at > regular and consistent intervals. > The way I've done this is just to create a thread and trap the execution > path in an infinite loop using while(1){some code;cyg_thread_delay()} or > for(;