Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-14 Thread Chris Liechti
Matthias Weingart wrote: Some remarks to examples/tasker swap() should be implemented as naked it does not work with gcc optimising switched off (R4 is push onto stack and confuse swap() or at least the debugger ;-) thats coorect, it must be a "nacked" function for correct function Is the c

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-14 Thread Matthias Weingart
Some remarks to examples/tasker swap() should be implemented as naked it does not work with gcc optimising switched off (R4 is push onto stack and confuse swap() or at least the debugger ;-) Is the content of static TASK tasks[MAX_TASKS]; filled with zeros at startup? I think no. initTasking(

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-13 Thread Bill Knight
On Sat, 13 Dec 2003 17:50:54 +0100, Matthias Weingart wrote: I like it. It's quite simple. But another question, is it enough to push just R4 to R11? The mspgcc users manual says that R12 to R15 are "clobbered" registers. Can I use R12 to R15 for my own special purpose? How do you determine the s

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-13 Thread Chris Liechti
Matthias Weingart wrote: [about examples/tasker] I like it. It's quite simple. But another question, is it enough to push just R4 to R11? The mspgcc users manual says that R12 to R15 are "clobbered" registers. yes, these are used to pass parameters to the called function and the return value.

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-13 Thread Matthias Weingart
On Sat, Dec 13, 2003 at 09:34:25AM -0600, Bill Knight wrote: > Yes, that is one failing of the tasker. It has no concept of an idle task > making it difficult to easily implement LPM when there is nothing to do. > > Well what can you expect? It was originally written to provide threading > on a

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-13 Thread Bill Knight
On Sat, 13 Dec 2003 13:41:08 +0100, Matthias Weingart wrote: Bill, thanks for the code. (Your floating point #defines are tricky. :-) I think I will spend a timer for each task to let swap() know how long each task will have to sleep, and swap() will only load non-sleeping tasks or go into LPM.

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-13 Thread Matthias Weingart
Bill, thanks for the code. (Your floating point #defines are tricky. :-) I think I will spend a timer for each task to let swap() know how long each task will have to sleep, and swap() will only load non-sleeping tasks or go into LPM. M.

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-13 Thread Matthias Weingart
Bill, thanks for the code. (Your floating point #defines are tricky. :-) I think I will spend a timer for each task to let swap() know how long each task will have to sleep, and swap() will only load non-sleeping tasks or go into LPM. M.

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-12 Thread Bill Knight
On Fri, 12 Dec 2003 18:33:05 +0100, Matthias Weingart wrote: Hi Bill, I often do it the same way. However getElapsedSysTics() should check for overflow of sysTICs, or you get the Windows98 feeling - complete system freeze after 40 days ;-). May we can add it to the example/tasker? (maybe I have s

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-12 Thread Matthias Weingart
On Fri, Dec 12, 2003 at 10:18:30AM -0500, a...@pumpkininc.com wrote: > Hmmm .. the Salvo RTOS does all of this stuff already, and on the MSP430 > ... Is anyone intersted in investing the time to do the port? Or does the > fact that Salvo is not open-source make it unattractive to the mspgcc > comm

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-12 Thread Matthias Weingart
Hi Bill, I often do it the same way. However getElapsedSysTics() should check for overflow of sysTICs, or you get the Windows98 feeling - complete system freeze after 40 days ;-). May we can add it to the example/tasker? (maybe I have some spare time the days until new year). M. On Fri, Dec 12,

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-12 Thread a...@pumpkininc.com
Matthias wrote: "summary, extensions to tasker: - sleep(ms) (until time elapsed) - sleepinfinitely() (until interrupt, until another task has finished) - timeout() - code for a timer interrupt - some possibilities to prioritize tasks - if all tasks are sleeping switch to LPM" and "I have writt

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-12 Thread Bill Knight
I'm going to top post this because I want to keep the following response from Matthais but want to make a couple of short comments concerning the use of the cooperative tasker. 1) it is possible to wait for an event in a task and still allow other tasks to run. Use a construct like: while (wait

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-12 Thread Matthias Weingart
On Mon, Dec 08, 2003 at 11:45:16PM +0800, Steve Underwood wrote: > Hi all, > > The tasker code in examples, is function but very basic. Oleg's SOS is > rather more functional, but doesn't really address the needs of an > MSP430 user - it does nothing about power management. Hi Steve, I have a

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-09 Thread Andrew E. Kalman
Steve wrote: The tasker code in examples, is function but very basic. Oleg's SOS is rather more functional, but doesn't really address the needs of an MSP430 user - it does nothing about power management. I spent some idle moments today trying to formulate what an MSP430 kernel should really

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-08 Thread Oleg Skydan
Hi, Steve, > The tasker code in examples, is function but very basic. Oleg's SOS is > rather more functional, but doesn't really address the needs of an > MSP430 user - it does nothing about power management. In my transceiver control software I do some power management over the SOS kernel (I run

Re: [Mspgcc-users] multi-tasking with the MSP430

2003-12-08 Thread Garst R. Reese
Steve Underwood wrote: > > Hi all, > > The tasker code in examples, is function but very basic. Oleg's SOS is > rather more functional, but doesn't really address the needs of an > MSP430 user - it does nothing about power management. I spent some idle > moments today trying to formulate what an

[Mspgcc-users] multi-tasking with the MSP430

2003-12-08 Thread Steve Underwood
Hi all, The tasker code in examples, is function but very basic. Oleg's SOS is rather more functional, but doesn't really address the needs of an MSP430 user - it does nothing about power management. I spent some idle moments today trying to formulate what an MSP430 kernel should really be li