On Tue, 2006-01-31 at 08:51 +1100, Stephen George wrote: > Hi Andrew, > > > > > eCos has two serial device drivers for each board. The one in the hal > > directory is a very simple polled IO, real time unfrendly, version > > which is used for debugging. All diag_printf() output uses this driver > > and also communcation to gdb. > Speaking of which, is there any problem in using diag_printf() in DSR's? > > We were working on a USB driver, and getting very flaky operation > degrading to non operation of the driver, the cause couldn't be tracked > down, until we removed ALL the diag_printf(...), then the driver seems > to work reliably. > > So I guess I'm asking should I feel comfortable the cause was using > diag_printf(..) in the DSR's, or should I be looking for problems in our > USB driver.
diag_printf() does not use interrupts and the entire message will be sent to the diagnostic device, unbuffered, at the time of the call. This means that each message may drastically alter the timing of your system. For example, at 38400 baud, a 10 character message will take about 2.5ms to print. For devices where time is critical (USB happens to be such), this most likely would break things badly. -- ------------------------------------------------------------ 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