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?


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.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
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]