FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2008 Threads] Help taskdelayPosted by Dragie on June 9, 2008 heej all,
i am making a robot, with freertos only i am getting some problems. the Microcontroller = ATmega32.
i made 2 tasks (they work fine).
task 1, says what dance move he must do. task 2, says what ports he must set high (to dance).
then i got an external interrupt. when he sees an interrupt on the front is has to stop and move backwards. the commands it sets are in task 2 to.
somehow it seems it is doing 2 commands @ the same time but i have no clue why. in the external interrupt it wil put temp on 0. example code:
for(;;) { if (temp == 1) { if ((x == 1) && (y == 0) && (z == 0) && (w == 0)) { PORTB = ~0x10; vTaskDelay( 3000 / ( portTickType ) 2 ); } etc to dance }
if (temp == 0) { if (evede == 1) { temp = 0; PORTB = ~0xFF; vTaskDelay( 3000 / ( portTickType ) 2 ); PORTB = ~0xA0; vTaskDelay( 3000 / ( portTickType ) 2 ); temp = 1; } }
i also tryed to just make 2 task instate of temp == 0 amd temp == 1;
but i can't get the tasksuspend and resume to work (they are turned on 1 in the config file)
anny1 know what is going wrong, if you wanne / can help you can always contact me on MSN messenger to: mike.aalbers@upcmail.nl
grtz
dragie
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|