posted August 28, 2001 12:39
It seems that I can't get more then 3 tasks to run.Even if I change the salvocfg.h to
code:
#if !defined (MAKE_WITH_FREE_LIB) && !defined (MAKE_WITH_STD_LIB)/* */
/* configuration options for project that's made using the */
/* source files. */
/* */
#define OSBYTES_OF_DELAYS 1
#define OSENABLE_SEMAPHORES TRUE
#define OSEVENTS 2
#define OSTASKS 4
#define OSLOC_ALL bank1
#else
/* */
/* configuration options for projects that are made using */
/* either the freeware or standard libraries. Multitasking */
/* with delays and events, events services called only */
/* from background. */
/* */
#define OSUSE_LIBRARY TRUE
#ifdef MAKE_WITH_FREE_LIB
#define OSLIBRARY_TYPE OSF
#elif defined(MAKE_WITH_STD_LIB)
#define OSLIBRARY_TYPE OSL
#endif
#define OSLIBRARY_CONFIG OSA
#define OSLIBRARY_VARIANT OSB
#define OSEVENTS 2
#define OSTASKS 4
#endif
The 4th task created will not run at all even with the highest proirity.
code:
void main(void)
{
OSInit(); //Initialize OS
OSEnableInts();
OSCreateTask(TempCheck,OSTCBP(1),6); //Create Tasks,unique#1,Priority 10
OSCreateTask(Clockit,OSTCBP(2),8); //Create Tasks,unique#1,Priority 10
OSCreateTask(DamperClosed,OSTCBP(3),4); //Create Tasks,unique#1,Priority 10
OSCreateTask(DamperOpen,OSTCBP(4),1); //Create Tasks,unique#1,Priority 10
OSCreateSem(DAMPER_OPEN,0);
OSCreateSem(DAMPER_CLOSED,0);
PORTB=0;
PORTA=0;
TRISB=0;
TRISA=1;
while(1) //do this forever
{
OSSched(); //new way, just call OS Scheduler
OSTimer();
}
}
[This message has been edited by srhoar (edited August 28, 2001).]
[This message has been edited by srhoar (edited August 28, 2001).]
[This message has been edited by srhoar (edited August 28, 2001).]
[This message has been edited by srhoar (edited August 28, 2001).]