FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [January 2016 Threads]
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 & ( UBaseTypet ) ( ~portPRIVILEGEBIT ) ) < ( UBaseTypet ) 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.
Something doesnt add up. The assert tells you you have tried to create a task at a priority higher than the configMAXPRIORITIES setting but the post shows a task being created with priority 5 and you say configMAXPRIORITIES is 8.
because there are 8 priorites in cortex M3 and CC2538.
How did you figure that? You must be confusing tasks and interrupts.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.