Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


after porting simple task which turn on led doesn't work.

Posted by boogalee on January 19, 2016


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;

  SysCtrlClockSet(false, false, SYS_CTRL_SYSDIV_32MHZ);



return 0;

} ~~~~

~~~~ void vTaskLedToggle(void *pvParameters ){



} ~~~~

it could be weird, vTaskLedToggle is just turn on the led.

where is the problem ?


after porting simple task which turn on led doesn't work.

Posted by davedoors on January 19, 2016

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.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS