This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Serial interface problem


Hello,

I have found the problem, it seems that the UART does not generate
an interrupt befor the first time a character was send.

After making the attached change it works.

I will make the same patch to the e7t driver and send it to ecos-patches.

Roland

On Mittwoch, 11. Februar 2004 15:16, Roland Caßebohm wrote:
> Hello,
>
> maybe do I have to set "Claim comms virtual vector" in my application?
>
> Roland
>
> On Mittwoch, 11. Februar 2004 13:06, Roland Caßebohm wrote:
> > Hello,
> >
> > I have a problem using the serial interface on our new
> > S3C4510 based platform.
> >
> > I use a copy of the serial driver for the internal UARTS
> > from the e7t platform. It works, but if I configure
> > RedBoot to only use the first UART by disabling
> > CYGPKG_REDBOOT_ANY_CONSOLE, the second UART don't work
> > anymore in my application.
> >
> > If application sends some character s3c4510_serial_start_xmit()
> > gets called and in it the transmit interrupt will be unmasked,
> > but the ISR are never called.
> >
> > // Enable the transmitter on the device
> > static void
> > s3c4510_serial_start_xmit(serial_channel *chan)
> > {
> >     s3c4510_serial_info *s3c4510_chan =
> >             (s3c4510_serial_info *)chan->dev_priv;
> >     s3c4510_chan->tx_enabled = true;
> >     cyg_drv_interrupt_unmask(s3c4510_chan->tx_int_num);
> > }
> >
> > If I look in the registers of the UARTs, both UARTs are
> > configured equal with rx and tx irq enabled.
> >
> > If I look at the interrupt mask register it stay unmasked
> > for the tx interrupt of second port.
> >
> > It seems like RedBoot gets the interrupt but don't give
> > it to the application.
> >
> > Does anybody know what could be wrong?
> >
> > Roland
Index: devs/serial/arm/s3c4510/current/src/s3c4510_serial.c
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/devs/serial/arm/s3c4510/current/src/Attic/s3c4510_serial.c,v
retrieving revision 1.1.2.1
diff -u -5 -p -r1.1.2.1 s3c4510_serial.c
--- devs/serial/arm/s3c4510/current/src/s3c4510_serial.c	20 Oct 2003 16:22:08 -0000	1.1.2.1
+++ devs/serial/arm/s3c4510/current/src/s3c4510_serial.c	11 Feb 2004 16:09:45 -0000
@@ -230,11 +230,14 @@ s3c4510_serial_set_config(serial_channel
 static void
 s3c4510_serial_start_xmit(serial_channel *chan)
 {
     s3c4510_serial_info *s3c4510_chan = (s3c4510_serial_info *)chan->dev_priv;
     s3c4510_chan->tx_enabled = true;
-    cyg_drv_interrupt_unmask(s3c4510_chan->tx_int_num);
+    (chan->callbacks->xmt_char)(chan);
+    if (s3c4510_chan->tx_enabled) {
+        cyg_drv_interrupt_unmask(s3c4510_chan->tx_int_num);
+    }
 }
 
 // Disable the transmitter on the device
 static void 
 s3c4510_serial_stop_xmit(serial_channel *chan)

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]