AnsweredAssumed Answered

Trouble getting UART working between a BF533 and a FT232R.

Question asked by UHF on Sep 28, 2011
Latest reply on Oct 1, 2011 by UHF

Hello,

 

I've been stumped by a serial port issue between my Blackfin and an FT232R USB interface chip.  I'm beginning to wonder if I'm missing something fundamental about the blackfin UART.

 

 

I need to run the interface fast, but the errors happen no matter what baud rate I set.  I tried 9600 baud continuous, and I see data going missing.

 

Things I've tried to shake this out;

 

Different baud rates don't seem to make any useful difference (and I've custom set the baud rate on the USB chip for precision).  I'm running at 888888, at 115200 both of which have errors.  At 115200 I see single bytes periodically go missing.  At 888888 I see blocks of up to 21 bytes simply go missing. At 9600 baud large blocks of bytes (20?) go missing.  I've tried 250,000 kbits, which is an exact match for the USB chip and the Blackfin.  I still see single bytes go missing.

 

I've used USB port monitoring software and traced what happens there and in my UART device driver.  I can see that my device driver sends all the bytes correctly, but that they are not arriving at the PC.  The USB communication trace shows that the bytes never make it into windows in the first place. The bytes that go missing are anywhere in my data packets.   (So its not at the  ends, or any time where I start or stop the transactions.)

 

My original device driver used a serial port FIFO, and I rewrote the driver to hold memory blocks, and release them when transmission was complete.  Essentially, two completely different architectures, one a byte based FIFO squirt, and the other is transaction based (what I'm currently using).

 

Communications are essentially one way for the purposes of testing.  The PC askes the Blackfin to start sending data, and never speaks again.  So there's no way for TX and RX to cross paths.

 

The UART driver in question here is interrupt based, and sends data byte by byte via interrupt.  While I want to get data out of the blackfin fast, I'm not too worried about performance, my loading is currently hovering at 80%.

 

I have my own run to completion OS.  I use it on many many hardware platforms and I'm very confident in its handling of my system events.  I do as little as possible in the interrupt context.  And even if blocked for a while, the ISR will get called.

 

SCLK is currently 100Mhz.

 

Lastly there is a test board with an MSP430 running with two FT232R USB chips on it.  Its able to succesfully send and receive data with no losses.  So we are reasonably happy with the hardware.  I even used the HPUSB-ICE USB cable for some tests just to eliminate that possibility.

 

http://www.ftdichip.com/Products/ICs/FT232R.htm

 

Can anyone see if I'm doing something wrong?  I am completly stumped.

Attachments

Outcomes