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

FreeRTOSV7.4.0 Atmega32 running only one task

Posted by shoeb on April 13, 2013
Hello,

I have created a couple of tasks to blink some LED's connected to output port of Atmega32. I am using STK500.

But I am able to run only one task. I am not sure the other task is even getting created. I checked with several stack sizes from minimal to 500 bytes for each task. Still does not help. I do not have any debugger to check the code at run time I am using AvrStudio 4.14 for development.

Appreciate all your help thanks...

RE: FreeRTOSV7.4.0 Atmega32 running only one task

Posted by Dave on April 13, 2013
Check the return value of xTaskCreate() to know if the task is being created, and invest in a debugger. I think you can run the code in the AVR simulator without a debugger.

RE: FreeRTOSV7.4.0 Atmega32 running only one task

Posted by shoeb on April 17, 2013
Thanks for replying,

I will be doing that. I checked with creating on only one task and it does what it is supposed to do.

Task 1 by itself toggles the LED's as it should. Task 2 by itself toggles as it should.

But when I want to create both of them only of them is created. I am not able to understand if I am overflowing the stack or is there something to do with the interrupts? Or am I missing any macro that I should configure before compiling.

Thanks.

RE: FreeRTOSV7.4.0 Atmega32 running only one task

Posted by shoeb on April 21, 2013
Hi,

Both the tasks are created I verified using Simulation in AvrStudio debugger. But only one of them is running. The low priority task. Please help. The high priority task never seems to be executed.

RE: FreeRTOSV7.4.0 Atmega32 running only one task

Posted by Richard on April 22, 2013
Please first check that your tick interrupt is executing. You can do this quite simply by either setting a break point in vTaskIncrementTick() (in task.c) or by inspecting the xTickCount variable when the application has been running for a while. xTickCount should not be zero after a tick interrupt has executed.

If the tick interrupt is executing please post the outline of your tasks here.

Regards.


[ 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