I connected two Bus Pirate 2gos with firmware 2.2-nightly. Unfortunately, they're different PIC revisions, so that might leave room for problems.
I sent some characters each way at 300/8/n/1. Data from one to the other was fine. But data the other way was always corrupt (same value).
I attached a logic analyzer and looked at the output from the BP that was arriving corrupted, it's just fine. So it appears to be an RX problem (on my B4 chip only, not sure if that makes a difference). I'd like to look at the data between them to verify there's no noise, but I don't have enough USB cables.
I'm looking at the
errata for the PIC and found a bug for your two stop bit scenario, not sure if it applies:
39. Module: UART
When the UART is operating using two Stop bits
(STSEL = 1), it may sample the first Stop bit
instead of the second one. If the device being
communicated with is one using one Stop bit in its
communications, this may lead to framing errors.
Work around
None.
I'll keep looking. I don't see anything immediately in the code. Sometimes changing from bit operations to proper &= |= prevents stupid compiler tricks, I might try that next.
There's also issue 11, but it applies only to A4, and I'm seeing this on B4 only (?).
11. Module: UART
When the UART is in High-Speed mode, BRGH
(UxMODE<3>) is set; some optimal UxBRG
values can cause reception to fail.
Work around
Test UxBRG values in the application to find a
UxBRG value that works consistently for more
high-speed applications. The user should verify
that the UxBRG baud rate error does not exceed
the application limits. If possible, it is
recommended to use a comparable baud rate in
Low-Speed mode.
What PIC revision do you have (press i in the terminal).