Re: How to define task in RTOS
Re: How to define task in RTOS
Source: http://coding.derkeiler.com/Archive/General/comp.arch.embedded/2005−07/msg00744.html
• From: "ckto" • Date: Thu, 21 Jul 2005 22:14:24 −0500 Hi all, The reason for me to use an RTOS is the realtime preformance. I want to a really modulized software development, I hope different people can working standalone on their task development. The system can still can (in thoery) work without one of the task. Say, in case I have a big trouble with the IrDA right before the design release. I just no to create the task, then the rest of system still will run prefectly. I think above reason is good enough to use RTOS, and that's anyway one of the benefit from RTOS which written in a lot of books. Is it right? And Richard's advice is great for me. Thanks Richard.
have a good day Ken
>ckto wrote: > >> Hi all, >> >> I am going to use freeRTOS to do project, which has the following hardware >> module. >> >> − 128x64 dot mono LCD graphic module >> − 4 key (direct key configure) >> − IrDA for printing >> − doing ADC via I2C interfaced ADC every 500ms >> >> The function of the device is; >> − User can use the key and display to read the DAC value >> − PC can request the ADC value / Key status / LCD status via RS485 / USB. >> − User can use the key to trigger a IrDA printing for the DAC value. Re: How to define task in RTOS 1
Re: How to define task in RTOS >> >> Now, I don't know how to arrangement the task in the right way. I think I >> may do it in the following way. >> >> Task definition >> 1) KEYSCAN − key scan task, which provide keycode mainly for OPERATION >> task >> 2) DISPLAY − receive the OPERATION task request and display the result. >> 3) ADC − A task make sure AD conversion for every 500ms non−stop >> 4) IRDA − Receive the request from OPERATION task, and send the DAC value >> to IrDA interface >> 5) OPERATION − task handling all user interface and deliver the request to >> other task for finishing it. >> >> My problem: >> task DISPLAY and IRDA will need the ADV value from task ADC. In this >> situration 2 task will request a resource (say it's a queue) from one >> task. I think it's no good. It increase the RTOS overhead and make too >> many inter−task communication. >> >> Or I do it in the way that OPERATION task is a master. It is the only one >> to get the ADC value from the ADC task, and then distrub it to the other >> task, is necessary. Then we will have not more then one task have a >> connection to ADC task. For this approach, I have a doubt. >> >> I think normally, we will give the lowerest priority to the OPERATION >> task, because it should be a task can accept longer responce delay. And it >> my second approach, the important task; IRDA task; priority lower than it >> should be. Since IRDA task always has to wait for a resource (ADC value) >> from a lower priority task. It's no good, right? >> >> Would you give me the advice? Thanks in advance. >> >> >> have a good day >> Ken >> > >It seems to me you are making something simple into something far too >complex. I doubt you really need an RTOS for such a simple system. However, >it is good practice to identify the various tasks and their interfaces Re: How to define task in RTOS 2
Re: How to define task in RTOS >however you decide to implement them. > >The problem is you have only given us part of the information. You first >need to write a requirements spec which describes the functions and >performance (e.g. time constraints) of the system. For examples you have >made no mention of how the user interface works, what commands there are >and what they do. > >Ian >
This message was sent using the comp.arch.embedded web interface on www.EmbeddedRelated.com .
• Follow−Ups: ♦ Re: How to define task in RTOS ◊ From: Ian Bell ♦ Re: How to define task in RTOS ◊ From: Meindert Sprang • References: ♦ How to define task in RTOS ◊ From: ckto ♦ Re: How to define task in RTOS ◊ From: Ian Bell • Prev by Date: Re: Car Computer PC−104 Shut down Power up • Next by Date: Re: Car Computer PC−104 Shut down Power up • Previous by thread: Re: How to define task in RTOS • Next by thread: Re: How to define task in RTOS • Index(es): ♦ Date ♦ Thread
Re: How to define task in RTOS
3