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] [January 2007 Threads] Time management FreeRTOSPosted by ikram on January 12, 2007 I have three tasks.
static void vTaskAd( void *pvParameters ); //broadcast the ATYPE packets static void vTaskSu( void *pvParameters ); //read the socket and check the SType packets static void vTaskPu( void *pvParameters ); //broadcast the PTYPE packets
Let suppose Subscription packets are generated every 10sec.
1. vTaskAd runs continuously until any reception of the STYPE packet 2. vTaskSu(read the STYPE packets every time) run continuously 3. If it found the STYPE packet then vTaskPu task will start. 4. vTaskAd will goes to sleep until let suppose TTL= 1000ms and the vTaskPu will run till TTL=1000ms 5. After 1000ms the vTaskSu task again starts and do the same above steps.
Could anyone please guide me I am facing problem with the time management of the tasks.
Time management FreeRTOS(New)Posted by ikram on January 12, 2007 I have three tasks. static void vTaskAd( void *pvParameters ); //broadcast the ATYPE packets static void vTaskSu( void *pvParameters ); //read the socket and check the SType packets static void vTaskPu( void *pvParameters ); //broadcast the PTYPE packets Let suppose SType packets are generated every 10sec. 1. vTaskAd runs continuously until any reception of the STYPE packet 2. vTaskSu(read the STYPE packets every time) run continuously 3. If it found the STYPE packet then vTaskPu task will start. 4. vTaskAd will goes to sleep until let suppose TTL= 1000ms and the vTaskPu will run till TTL=1000ms 5. After 1000ms the vTaskSu task again starts and do the same above steps. Could anyone please guide me I am facing problem with the time management of the tasks.
RE: Time management FreeRTOS(New)Posted by Richard on January 12, 2007 Sorry but I'm not sure what you are asking.
You are saying that vTaskAd runns until vTaskSu receives an SType packet (what ever that is)? Therefore task vTaskSu has to suspend vTaskAd when it receives a packet? Is this correct?
Regards.
RE: Time management FreeRTOSPosted by ikram on January 14, 2007 I have three tasks. static void vTaskAd( void *pvParameters ); //broadcast the ATYPE packets static void vTaskSu( void *pvParameters ); //read the socket and check the SType packets static void vTaskPu( void *pvParameters ); //broadcast the PTYPE packets Let suppose SType packets are generated every 10sec.
By default vTaskAd runs in the begning and vTaskSu keep listening the packets. if in the mean time vTaskSu receive any Stype packets then it will suspend the vTaskAd(let suppose 1000ms) and it will run vTaskPu for the time of 1000ms. after 1000ms it will resume the vTaskAd..
I have not try time scheduling with freeRTOS could you please guide me what will be the commands for these tasks.
RE: Time management FreeRTOS(richard)Posted by ikram on January 15, 2007 I have three tasks. static void vTaskAd( void *pvParameters ); //broadcast the ATYPE packets static void vTaskSu( void *pvParameters ); //read the socket and check the SType packets static void vTaskPu( void *pvParameters ); //broadcast the PTYPE packets Let suppose SType packets are generated every 10sec.
By default vTaskAd runs in the begning and vTaskSu keep listening the packets. if in the mean time vTaskSu receive any Stype packets then it will suspend the vTaskAd(let suppose 1000ms) and it will run vTaskPu for the time of 1000ms. after 1000ms it will resume the vTaskAd..
I have not try time scheduling with freeRTOS could you please guide me what will be the commands for these tasks.
RE: Time management FreeRTOS(richard)Posted by Richard on January 15, 2007 I think the simplest way would be to simply call vTaskSuspend() to suspend the tasks when necessary. You can keep a track of the tick count, then call vTaskResume() when the time comes. You might even suspend one task, then call vTaskDelay( 1000 ) to know when it is time to resume it, and call vTaskResume() as soon as you unblock (assuming there is nothing else to do in the mean time).
Regards.
RE: Time management FreeRTOSPosted by ikram on January 15, 2007 static void vTaskSu( void *pvParameters ); //read the socket and check the SType packets
found Stype packet then
SuWakeTime = xTaskGetTickCount(); vTaskDelay(1000);
//Now I want to put vTaskAd to sleep to the same time as vTaskSu (Duration for both Tasks vTaskSu and vTaskAd for sleep is same) -------
static void vTaskAd( void *pvParameters ); //broadcast the ATYPE packets
-------
//Now I want to AWAKE or Run vTaskPu for the time when vTaskSu and vTaskAd are in sleeping mode.
static void vTaskPu( void *pvParameters ); //broadcast the PTYPE packets
-------- //when the time of sleeping of vTaskAd and vTaskSu expired i want to send vTaskPu in sleep mode.
Please guide me i could not able to slove it.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|