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

vTaskDelay

Posted by Robert Brock on May 5, 2009
Two steps forward, one step back.

I'm trying to use vTaskDelay with the ATMega323_WinAVR, but it seems to never return from the delay. I thought I had learned my lesson from mutex semaphores, so I checked FreeRTOSConfig.h and made sure INCLUDE_vTaskDelay was defined. Are there any other items I should look at?

Thanks.

RE: vTaskDelay

Posted by Richard Damon on May 5, 2009
First make sure your tick interrupt is working. If it isn't then delay doesn't have a chance to work.

RE: vTaskDelay

Posted by Richard on May 5, 2009
...to add to what richard_damon said (which is the first thing to check)...

the standard demo tasks which run on the ATMega323 use vTaskDelay() and vTaskDelayUntil() all over the place and these work fine. The easiest way to start your own project is to start with the standard demo which is already working, then modify that to remove the demo tasks and add in your tasks.

RE: vTaskDelay

Posted by Robert Brock on May 7, 2009
Thanks for the feedback. I am determined to get a handle on this RTOS. I understand the idea of using the demo, but whenever I make what seem like small changes to it, I don't get the results I'm expecting. For example, in the ATMega323 demo, I simply added a DDRA= 0xFF and PORTA = 0xFF to turn on all of the LEDs on my development board, but got nothing. I assume the demo has defined the port for another purpose, I just didn't stumble on it. It uses PORTB to control some LEDs, but on my board they are tied to PORTA.

It also seems to me that it shouldn't be that hard to build up an app from scratch, but I am sure struggling a bit. I just want to see a few tasks running with a message queue and a couple of semaphores. I didn't even see a semaphore in the ATMega323 example.

Related to Richard's response, is the tick interrupt tied to a timer? Can you point me to the right section in the documentation?

Thanks.


RE: vTaskDelay

Posted by Dave on May 7, 2009
I would recommend buying the book to learn the basics of the system.

RE: vTaskDelay

Posted by Robert Brock on May 7, 2009
Bummer ... I've asked too many stupid questions.


[ 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