Hi,
I had just ported FreeRTOS to CC2538 (cortex-M3).
and i had created one task and start the tasksheduler.
but it doesn’t work. i mean it doesn’t trun on led.
when i was debugging, i reallized one thing.
program went to infinite for loop
configASSERT( ( ( uxPriority & ( UBaseType
t ) ( ~portPRIVILEGEBIT ) ) < ( UBaseType
t ) configMAXPRIORITIES ) );
it is in xTaskGenericCreate function.
i configured configMAX_PRIORITIES 8, because there are 8 priorites in cortex M3 and CC2538.
i didnt define portPRIVILEGE_BIT, because im not using MPU
~~~~
int main(void) {
TaskHandle_t xHandle;
GPIOPinTypeGPIOOutput(GPIO_C_BASE,GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);
SysCtrlClockSet(false, false, SYS_CTRL_SYSDIV_32MHZ);
SysCtrlIOClockSet(SYS_CTRL_SYSDIV_32MHZ);
xTaskCreate(vTaskLedToggle,"LED_TOGGLE",configMINIMAL_STACK_SIZE,NULL,5,&xHandle);
vTaskStartScheduler();
return 0;
}
~~~~
~~~~
void vTaskLedToggle(void *pvParameters ){
for(;;)
{
GPIOPinWrite(GPIO_C_BASE, GPIO_PIN_0, GPIO_PIN_0);
vTaskDelay(1000);
}
}
~~~~
it could be weird, vTaskLedToggle is just turn on the led.
where is the problem ?
Regrads.