I use FreeRTOS with dsPIC and PIC18 only, but it appears that you made an obvious mistake. Your pin is OFF for 200000000 ticks and then for ON for 100 ticks. If you use a tick rate of 1000 ticks per second, this gives an OFF time of 55,55 hours and an ON time of 0,1 second. Even if your tick rate is 1,000,000 ticks per second (I doubt it), you would need to wait more than 3 minutes to see the LED on for 0,1 ms. Perhaps you didn't waited enough to see the LED flash ;) = Grant Brown escreveu: > Hi List, > > Trying to get the FreeRTOS up and running and having a view problems, > > If I run my task as a normal function without using TaskCreate or = > running the scheduler it runs fine and without any problems. > > ie the led flashes. > > If I try to run it by creating the task and then running the scheduler = > the led never flashes. > > I am running this on the PIC32 starter kit. > > My main function and my task are listed below for reference > > Can any one see what I'm doing wrong and give me some guidance. > > Kind Regards > Grant Brown > > #pragma config FPLLMUL =3D MUL_20, FPLLIDIV =3D DIV_2, FPLLODIV =3D DIV_1= , = > FWDTEN =3D OFF > #pragma config POSCMOD =3D HS, FNOSC =3D PRIPLL, FPBDIV =3D DIV_2 > > static void GrantsTask(void); > int Cnt =3D 0; > > int main( void ) > { > SYSTEMConfigPerformance(80000000); > PORTSetPinsDigitalOut(IOPORT_D, BIT_0|BIT_1); > mPORTDClearBits(BIT_0|BIT_1); > // GrantsTask(); = > xTaskCreate( GrantsTask, "GKB_Tsk", configMINIMAL_STACK_SIZE, NULL, = > tskIDLE_PRIORITY, NULL ); > vTaskStartScheduler(); > return 0; > } > > static void GrantsTask(void) > { > portTickType xLastExecutionTime; > const portTickType xFrequency =3D 100; > xLastExecutionTime =3D xTaskGetTickCount(); > while(1) = > { > vTaskDelayUntil(&xLastExecutionTime,xFrequency); = > mPORTDToggleBits(BIT_0); > Cnt++; > if (Cnt > 2000000) > { > Cnt =3D 0; > mPORTDToggleBits(BIT_1); > }; > }; > } > > = > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - http://www.avg.com = > Version: 8.0.173 / Virus Database: 270.8.1/1730 - Release Date: 10/17/200= 8 8:07 AM > > = __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist