vTaskDelay

rnbrock wrote on Tuesday, May 05, 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.

richard_damon wrote on Tuesday, May 05, 2009:

First make sure your tick interrupt is working. If it isn’t then delay doesn’t have a chance to work.

rtel wrote on Tuesday, May 05, 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.

rnbrock wrote on Thursday, May 07, 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.

davedoors wrote on Thursday, May 07, 2009:

I would recommend buying the book to learn the basics of the system.

rnbrock wrote on Thursday, May 07, 2009:

Bummer … I’ve asked too many stupid questions.