Reply by Andrea Barberio June 9, 20102010-06-09
I've found the solution, as the port was enabled and it wasn't a driver issue.
I just needed to enable the (by default) disabled UART #2 and UART #3 in the
linux kernel configuration, by enabling the following config directives:

CONFIG_MACH_LPC32XX_UART2_ENABLE

CONFIG_MACH_LPC32XX_UART3_ENABLE

This happens to be true also on LPC3250, for the interested ones.

A new problem arises now. I'm observing weird behaviour with a serial analyzer.
I am communicating with odd parity, but the parity bit is never set, rendering invalid
the traffic between the LPC2478 and the connected hardware. This doesn't seem
a code issue, because the same C program runs fine on a Linux/x86 PC, while it
fails on the LPC2478/uClinux system.

What may be happening?

Regards,
Andrea

________________________________
From: Andrea Barberio
To: l...
Sent: Mon, June 7, 2010 9:32:08 AM
Subject: Re: [lpc2000] Re: Serial driver

> From: rtstofer

> > So, I had to move back to the original problem: the real serial port. Has anyone suggestions or
> > tests/patches to try to solve it? I really need that serial port to work, and I think it's impossible
< > that no one can use it on uClinux.

> Let's assume the serial port really is causing excessive interrupts. Why would that be? Since this
> port has full modem control, are the control signals in a state that would result in an interrupt?
>
> Have you tried actually controlling all of the modem signals? What about disabling those interrupts in the driver?

Sorry for my late reply, but I've been sick for over a week. As of the LPC2478's
manual, UART #1 can't be used on 32-bit databus boards (which is my case), so
I don't actually have a full modem port available. The only available ports are
UART #0 (working fine as serial console with uClinux) and UART #2 (rt/tx only).
I _think_ there's no actual interrupt triggering, as the port is disconnected and no
pins, with the exclusion of tx and rx, are enabled by the jumpers on the board.

I didn't try disabling interrupts, but I will try that right now.

Andrea

An Engineer's Guide to the LPC2100 Series

Reply by Andrea Barberio June 7, 20102010-06-07
> From: rtstofer

> > So, I had to move back to the original problem: the real serial port. Has anyone suggestions or
> > tests/patches to try to solve it? I really need that serial port to work, and I think it's impossible
< > that no one can use it on uClinux.

> Let's assume the serial port really is causing excessive interrupts. Why would that be? Since this
> port has full modem control, are the control signals in a state that would result in an interrupt?
>
> Have you tried actually controlling all of the modem signals? What about disabling those interrupts in the driver?
Sorry for my late reply, but I've been sick for over a week. As of the LPC2478's
manual, UART #1 can't be used on 32-bit databus boards (which is my case), so
I don't actually have a full modem port available. The only available ports are
UART #0 (working fine as serial console with uClinux) and UART #2 (rt/tx only).
I _think_ there's no actual interrupt triggering, as the port is disconnected and no
pins, with the exclusion of tx and rx, are enabled by the jumpers on the board.

I didn't try disabling interrupts, but I will try that right now.

Andrea

Reply by rtstofer May 28, 20102010-05-28
--- In l..., Andrea Barberio wrote:
serial analyzer it seems like a parity problem.
>
> So, I had to move back to the original problem: the real serial port. Has anyone suggestions or
> tests/patches to try to solve it? I really need that serial port to work, and I think it's impossible
> that no one can use it on uClinux.
>
> Thanks in advance,
> Andrea Barberio
>

Let's assume the serial port really is causing excessive interrupts. Why would that be? Since this port has full modem control, are the control signals in a state that would result in an interrupt?

Have you tried actually controlling all of the modem signals? What about disabling those interrupts in the driver?

Richard

Reply by Andrea Barberio May 28, 20102010-05-28
Hi to everyone,
I forward this message to the LPC2000 list, as I'm still waiting for approval on LPC2400 list.

----- Forwarded Message ----
From: Andrea Barberio
To: l...
Sent: Thu, May 27, 2010 12:28:28 PM
Subject: Serial driver

Hi to everyone,
this is my first post to the mailing list. I am working on an LPC2478 branded by EmbeddedArtists,
which uses uClinux with a 2.6.21 linux kernel, and I'm having issues with the serial ports.
My application needs to communicate with a serial device (only RX/TX required), and the board
makes available UART #0 (used for the serial console, working fine), UART #1 (full modem port)
and UART #2 (RX/TX only, it's mutually exclusive to UART #1 if I understand correctly).

With a simple open() on /dev/ttyS1, UART #1 simply screams of pain and floods the terminal with
the following message:

"too much work for irq7".

I've searched around and I found it's a common problem. I also contacted the technical support from
the vendor, but the only "solution" I came across is the one at the following link:

http://tech.groups.yahoo.com/group/lpc2400_uClinux/message/692

which enables UART #2 instead of UART #1, by patching both the bootloader and the 8250 driver.
This solution doesn't work for me, even after a lot of work and further patches. Since I was spending
too much time, I decided to work around it for some time using an FTDI usb-serial converter, while
keeping searching a solution on the real serial port. USB-serial wasn't a solution, not even as
workaround, as the usb-serial converter doesn't work as expected. It works fine with the same
application code and converter on a PC with Linux, but doesn't work on uClinux/LPC2478: using a
serial analyzer it seems like a parity problem.

So, I had to move back to the original problem: the real serial port. Has anyone suggestions or
tests/patches to try to solve it? I really need that serial port to work, and I think it's impossible
that no one can use it on uClinux.

Thanks in advance,
Andrea Barberio