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: MPC555 serial driver delay


> After stepping though the code with interrupts enabled it seems that
> there is a single byte hardware buffer that generates a transmit
> interrupt when it is empty. When cyg_io_write() is called the ISR/DSR
> are setup and the TX interrupt is enabled. The DSR is called straight
> away as the buffer is already empty.
> 
> The problem is that the DSR mpc555_serial_tx_DSR() in turn calls the
> generic serial_xmt_char() in serial.c which then calls
> mpc555_serial_putc() for each byte in the software buffer to copy it
> into the single byte hardware buffer each time testing to see if the
> buffer is empty. The execution of application threads seems to be
> blocked all the while until the whole buffer is written out because it
> is taking place in a DSR context of the back of a single interrupt.

mpc555_serial_putc() should return false when the buffer is full. This
tells serial_xmt_char() to stop sending bytes, and so the DSR should
exist.

If i understand you correctly, you are seeing a busy loop somewhere?
Where is this loop?

      Andrew

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