Skip to main content
Topic: UART Speed Problem? (Read 4023 times) previous topic - next topic

UART Speed Problem?

I just got my Bus Pirate v2go, and updated it to firmware 2.2, and tried to use UART mode to connect it to a TTL serial LCD backpack at 2400/8/n/1, but kept getting line noise on the display. By linking the BP to another TTL serial adapter, I've determined that the BP is running its UART at 300bps no matter what I tell it to use. Has anyone else seen this? Is there a firmware update to fix this?

Possibly important info:

Bus Pirate v2go
http://dangerousprototypes.com
Firmware v2.2
DEVID:0x0447 REVID:0x3003 (A3)

Re: UART Speed Problem?

Reply #1
Thanks for doing that leg work. I'll see if I can fix it today. I also ran it by a logic analyzer, it's auto baud calculator kept registering 300baud but I thought it was a fluke. That explains a lot. Now that I know the problem it shouldn't be hard to fix.
Got a question? Please ask in the forum for the fastest answers.

Re: UART Speed Problem?

Reply #2
I remember when 300 baud was the sign that things were working properly.

Re: UART Speed Problem?

Reply #3
I made a little change and uploaded a v2.3 nightly to the v2go SVN firmware folder. Could you bootload that and see if it helps? The code looks fine, I suspect an input routine error or a stupid compiler trick. I'll run it by the LA later tonight or tomorrow.
Got a question? Please ask in the forum for the fastest answers.

Re: UART Speed Problem?

Reply #4
I'm getting close. The array that holds the UART speeds was out of scope of the UART setting code. I have no idea why there wasn't a warning or error, but that seems to be the case.
Got a question? Please ask in the forum for the fastest answers.

 

Re: UART Speed Problem?

Reply #5
Argh! That was a real head scratcher. Turns out the speed variable in the mode config struct was only 1bit wide, so only 300baud or 1200baud were selectable (often with some garbage bits). This effected other modes as well.

I updated it and tested all speeds, everything seems to work great now. The latest nightly builds include a fix for v2go, v1, and v3:
http://code.google.com/p/the-bus-pirate ... k/firmware

Other platforms will get the fix in the 2.3 release, or just ask.

Thanks for helping solve this issue!
Got a question? Please ask in the forum for the fastest answers.