[ECOS] Simple serial comms

grahamlab graham.labdon@cranems.co.uk
Fri Jul 3 07:23:00 GMT 2009




> From: grahamlab
>
> I mean that if I send more that 128 bytes some go missing.
> If I set the read to block and then send my bytes the ecos program blocks
> until several messages of 128 bytes have been receeived before unblocking
> and when it unblocks the message received is corrupted

It looks to me like this serial driver uses an interrupt per byte. My guess
is one of the following is wrong: 1) you've selected a very high bit rate;
2) you've misconfigured eCos, and the CPU is running at a slow clock rate,
or 3) there is some other source of interrupts erroneously keeping the CPU
busy.

If the answer is 1, and you really need to speed things up, this driver
could be rewritten to use DMA. I would recommend using DMA into a buffer
large enough to capture, say, 15ms worth of data, and then using the 10ms
timer interrupt to transfer data from the DMA buffer to the user buffer. But
that would be a complete rewrite. You'd learn quite a bit about the eCos
interrupt and device driver structure, but it's nontrivial.



I have a standard ecos - I have not changed many settings 
where is the driver code located?
what could be a source of spurious interrupts?

-- 
View this message in context: http://www.nabble.com/Simple-serial-comms-tp24306125p24318811.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.


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



More information about the Ecos-discuss mailing list