Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

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

Posted by boogalee on January 19, 2016

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.


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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists