Skip to contentSkip to conversation

fast communication problem

DISCUSSION Ivan Korzakow 2 participants 2 messages Nov 16, 2005

lore
Share & tools
lore
#0 lore raw

Hi List,

I'm running a 2.6.14 linux on 96 MHz MIPS processor. I need to cope with a device that sends a byte of data every 50 microsecond through an UART with no FIFO. What would be the best (well, the least horrible) way to handle that ? The good point is that I know when the communication starts.

Any idea, any help, any "good luck" will be much appreciated !

Thanks in advance,

Ivan

#1 lore raw
Quoted 8 lines · Ivan Korzakow

Hi List,

I'm running a 2.6.14 linux on 96 MHz MIPS processor. I need to cope with a device that sends a byte of data every 50 microsecond through an UART with no FIFO. What would be the best (well, the least horrible) way to handle that ? The good point is that I know when the communication starts.

Quoted 5 lines

Any idea, any help, any "good luck" will be much appreciated !

Thanks in advance,

Ivan

Linux can handle interrupts at 100 microsecond intervals with an ix86 of 400 MHz or above. The MIPS is supposed to be superb for this kind of operation so you may not have a problem at 50 us and 90 MHz.

The hardware engineers here do know something so they would never design something that needed the CPU at 50 microsecond intervals --yet, although there are some new kids coming out of school that haven't a clue and might create a requirement like yours in the future!

The interrupt code must be well thought out, with the minimum overhead of getting a byte from your buffer and writing it to the device.

Use fixed buffers, probably ping/pong, so you don't have to allocate anything in the ISR. If it doesn't work, then call the hardware engineers the idiots they are after instrumenting the reason why it won't work (takes 80 microseconds just to get to the ISR, leaving negative time to do the work). They do everything in FPGAs nowadays. If they buffered just one byte, you get interrupted every 100 us, 4 bytes 200 us, etc. Every bit helps.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.13.4 on an i686 machine (5589.51 BogoMips). Warning : 98.36% of all statistics are fiction.
.

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.