This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Is eCos running any background process?


> Date: Wed, 8 Oct 2008 10:55:09 -0600
> From: gary@mlbassoc.com
> To: oricon776@hotmail.com
> CC: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Is eCos running any background process?
>
> Yong Chen Tan wrote:
>> Hi, I am using eCos on a AT91RM9200 processor developing a RFID application.
>> Currently I have created a single thread application of priority to run my program.
>> However the application encounter some problems when I execute my function.
>>
>> The function is to capture all the 2238 data response and put it into raw_data.
>> The data readDOUT is read when readDSYNC is of value 0.
>> This is done using the do while loop. So the function will poll for the readDSYNC for value 0.
>> Once value 0 detected, the function will capture the readDOUT value and put it into raw_data.
>> However, my application got problems capturing all the 2238 data. Out of these 2238 data, 4 of these data are missing.
>> After analysing the problem, we think that is it because of the loop of 2238 is too big?
>> Or is it because the eCos is switched to do some background process that causes the missing 4 data not captured.
>> Is there any way to set the main thread to be the highest priority?
>> If that is the problem, is it possible to stop eCos from executing the background process whenever I execute this function?
>
> There are lots of things which may make your approach not work.
> First of all, there will always be interrupts from the system
> clock. Typically these come in at 100Hz (i.e. every 10ms).
>
> What's the rate of the DSYNC pulses (how far apart are they)?
> My guess is that they come in more rapidly that your system
> can process basic interrupts, like the system clock.
>
> Why not gather the data using the DSYNC signal as an interrupt
> signal. Then you can grab the value in the ISR and signal your
> higher level code when the whole frame (2238 items) have arrived.
>
> n.b. your previous multiple emails were so jumbled and incomplete
> as to be useless; it's no wonder you've not gotten any replies
> until now. Also, sending the same message over and over again,
> especially one which is basically noise, will not get you very far.
>

Hi, currently I am using polling to capture all my 2238 items because the interrupt is not fast enough. For my application, my DSYNC pulse is at 4.72us. That means I need to read on every 4.72us. My total time required to finish capture 2238 data is calculated to be 10.6ms. Based on your analysis saying that eCos will actually receive interrupts from system clock every 10ms. Is there a way to prevent eCos from doing anything during the 10.6ms? Because data is coming in at every 4.72us, so everytime when I execute this function, there is bound to be 4 DSYNC values not caputred. 
_________________________________________________________________
Get in touch with your inner athlete. Take the quiz.
http://yourinnerathlete.windowslive.com?locale=en-sg&ocid=TXT_TAGLM_WLYIA_takequiz_sg

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]