SomeRandomPerson / the-bus-pirate

Automatically exported from code.google.com/p/the-bus-pirate
Other
0 stars 1 forks source link

Buffer terminal TX to improve bus sniffer performance #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Right now it's easy for the bus sniffers to fall behind because the current
terminal transmit function is blocking (waits until it can send the bytes)
and sniffed bytes can be missed. A better solution is to buffer the
terminal output and periodically check the TX UART to see if more bytes can
be copied. Basically a cooperative multitasking setup.

Original issue reported on code.google.com by ianles...@gmail.com on 28 Apr 2009 at 6:49

GoogleCodeExporter commented 8 years ago
Wouldn't it be possible to add RX/TX-FIFOs (e.g. 128 bytes) with interrupts to 
handle
the communication in the background?
That's something I always do in my projects.

I've once written such an algorithm for a dsPIC30F.. it shouldn't be too hard 
to port
the code to PIC24F.

But the question is wether an interrupt driven algorithm interferes with the 
protocols. 
But I think it would be possible to disable the interrupts for a short time 
during
timing critical code because the UART module has an internal 4 byte buffer.

Original comment by laube_si...@hotmail.com on 4 Jul 2009 at 3:14

GoogleCodeExporter commented 8 years ago

Original comment by ianles...@gmail.com on 6 Nov 2009 at 11:14