Hi Bernie, Yes, I didn't expect that a realtime OS does not handle any threads/tasks. I wonder how it can be realtime without executing things interrupt based (by interrupting the non-time-critical thread). Or else, if I have to program in a way that it works without, I don't need an OS at all ;) (actually, I do using state machines myself, even in interrupt context, e.g. vor SD card initialisation in the background)
Also, I read about 'scheduler' and an idle loop, so I expected some kind of thread switching. And in the post I replied to, you didn't say that the OS (which I don't know and currently not really want to know) has no threads. (at least not in THIS post) If there's really just one thread and no stack manipulations, there's no reason why LPM should work in idle loop but not everywhere else. And to answer your other question: why should GCC set the GIE flag if you enter LPM? While usually you need GIE enabled to wakeup from LPM, you can also use NMI for this and weant to leave GIE disabled (which is impossible if it is always set automatically). If the missing GIE flag is your only problem, why not setting it? Shouldn't be a problem. There's even a macro for it :) And I guess you already tried, with no effect... JMGross ----- Ursprüngliche Nachricht ----- Von: Bernard Mentink An: GCC for MSP430 - http://mspgcc.sf.net Gesendet am: 30 Dez 1899 00:00:00 Thanks for the help, but you didn't read my post through..... ;-) As I said, this particular OS is a RTC OS, it does'nt have "threads" in the usual sense. It only has ONE stack .. there is no stack switching.. It seems no one can answer my main question! Why does mspgcc not set the GI= E bit at the same time as the low power bits???? IAR and other compilers do this... Thanks, Bernie
