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]

DSR Scheduling Problem


I am experiencing a problem with a serial driver that I'm developing.  It
uses separate RX and TX ISRs and DSRs.  The RX and TX ISRs just schedule the
corresponding DSR to run.

The test begins by transmitting data, which is looped back to the receiver.
It starts out with:
	TX ISR -> TX DSR
	TX ISR -> TX DSR
	...
	TX-ISR -> TX DSR

Then I get the RX ISR during the TX DSR, which just schedules the RX DSR.
However, the RX DSR does not run until 39 ms later, resulting in an overrun
error.  During this time period, the TX ISR and TX DSR continue their work
transmitting the remaining data.  After all of the data has been sent, THEN
the RX DSR runs.

Looking at the code post_dsr() and call_dsr() in
hal/common/current/src/drv_api.c, I noticed that the DSRs are queued at the
head of the list, and dequeued also from the head of the list.  This seems
wrong, as it can (and apparently does) cause DSRs to get delayed by other
DSRs that are queued later.  Seems like it would be better to queue them on
the end of the list and dequeue them from the head of the list, so that the
DSRs would get run in the order in which they are queued.

Jay


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