Check out the new projects site for A-i-S www.adventuresinsilicon.com

Wednesday, June 18, 2008

AVR FreeRTOS troubles

I have been playing with FreeRTOS (www.freertos.org) in an attempt to equip my carpet rover with the necessary intelligence to do two things at once.

I am developing my FreeRTOS solution on a AVR Mega32.

Last night I attempted to create two "tasks" to run in unison. Unfortunately despite my best efforts, after one iteration of each routine, one of the other routine would then be executed ad infinitum.

I am unsure why this happens. Tonight I will start debugging by executing two simple routines. I wonder if it has something to do with FreeRTOS "Queues". I have searched but been able to determine their exact purpose.

I'll be further looking at the AVR demo program to assist in debugging.


UPDATE #1: Ok it seems if both tasks are just outputing UART then they both work well together. Now lets see if I can incorporate the I2C (TWI) code for the www.hvwtech.com.au IR distace measuring sensors.

UPDATE #2: Ok got it working without Queues. It actually seems that all I needed to do was a make clean and then a make all as well as comment out the #include for "timer.h" which wasn't used anyway.

No comments: