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


Help taskdelay

Posted 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:

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



[ 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