farzadb82 / the-bus-pirate

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

UART Live mode fix #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The UART live capture on Buspirate v2go, does not work. I have tried
different versions 2.5, 3.0.

I believe that it is caused by line 174 in UART.c (current trunk - r87)

if(UART1RX()==' ')break; //escape

This line waits for input from user. 
The line should be replaced by something like:

if (U1STAbits.URXDA==1){
 if (U1RXREG == ' ') break;
}

do the checking only when data is ready in the buffer.

Original issue reported on code.google.com by michal.demin on 3 Dec 2009 at 8:24

GoogleCodeExporter commented 8 years ago
URAT1RX includes a blocking check for data:

http://code.google.com/p/the-bus-pirate/source/browse/trunk/source/baseIO.c#340

//get a byte from UART
unsigned char UART1RX(void){

    while(U1STAbits.URXDA == 0);
    return U1RXREG;
}

What issues are you experiencing? The forum would probably be the best place to 
discuss.

Original comment by ianles...@gmail.com on 4 Dec 2009 at 7:12

GoogleCodeExporter commented 8 years ago

Original comment by ianles...@gmail.com on 5 Dec 2009 at 5:36