Disabling FIFO in a serial port 16550A?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Corey
Date: Friday, June 15, 2007 - 10:31 am

I'm in the early stages of getting set up to program PIC chips (microchip.com)
and I've got it working using Microchip's free MPLAB IDE under Windows.  My
programmer is an ICD2 clone called the Inchworm2 from blueroomelectronics.com. 
Under OpenBSD I've been using Piklab (http://piklab.sourceforge.net) and it
mostly works.  I'm having trouble communicating from Piklab to the Inchworm
over a serial port.

Whenever I try to do something that involves a large transfer of data, like
programming the PIC, in Piklab I get a timeout on the serial port.  Short
things like the self-test, reading the voltages in the programmer, resetting
the PIC, seem to work OK.  In the Windows MPLAB and the documentation for it
there are warnings and popups telling you do disable the FIFO in a 16550a if
your serial port uses one.  I've done that in Windows and it works.  This the
same hardware, I'm just dual booting into OpenBSD or Windows.  I'm getting
tired of being stuck in Windows to have this work.

I've looked at the kernel config file hoping to find a flag I could set on the
serial port.  I've looked in stty, cua and pccom man pages.  I Googled a
little, but the only thing I seem to find that's close is how to do it in
FreeBSD by a flag in the kernel config.  I didn't try that.  I used to use
FreeBSD many years ago and it seems like there was a file called LINT or
something that listed all possble flags and options to the kernel config file,
but I haven't seen it in OpenBSD.  I'd like to find an interactive way to do
this like by running stty, but if I have to keep 2 kernels around I could live
with that.

The serial connection in the programmer is a little strange.  I suspect it's
running in synchronous mode because there's no provision for setting baud rates
anywhere or mention of it in the documentation.  I've got com1 under Windows
set to 56K baud, my /dev/cua00 in OpenBSD is running at 9600, and they both
work.  The connection out of the programmer to the target/project board appears
to be synchronous because there's just a data and a clock line.

I'm running OpenBSD 4.0 on an old Dell C610 laptop.  My /dev/cua00 looks like
this in dmesg:

  pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo

Any ideas?

Thanks,

  Alan


       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Disabling FIFO in a serial port 16550A?, Alan Corey, (Fri Jun 15, 10:31 am)