[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Com1 settings freezing board.



Hi,

As far as I know, we haven't experienced similar problems before.
Can you verify the output of /proc/tty/driver/serial with the setting 
and that communication work with the low speed?

Do you have the debug port on ttyS0? :
CONFIG_ETRAX_DEBUG_PORT0=y
in kernelconfig and os/linux/.config ?
If yes, try changing it to an unused port or set to DEBUG_PORT_NULL.
Verify that /dev/console link changes as well.

Best regards
/Johan 
Don't e-mail me directly - it's vacation time...

----- Original Message ----- 
From: "Matt Montwill" <mmontwill@xxxxxxx.com>
To: <dev-etrax@xxxxxxx.com>
Sent: Tuesday, July 20, 2004 11:43 PM
Subject: Com1 settings freezing board.


We are developing an application runs on the ETRAX 100LX.  Whenever we
set the baud rate of ttyS0 to something lower than 115200 such as:

stty -F/dev/ttyS0 speed 2400

and subsequently do:
 '/sbin/reboot'

The board will hang indefinitely (until power is recycled).  We're also
using libpcap to capture traffic on eth1.  If the baud rate of ttyS0 was
set to 2400 (or another low value). Pcap_setfilter will hang
indefinitely.  If pcap_setfilter is called when ttyS0 is set for 115200,
then there is no problem w/ packet capture.  It doesn't seem to matter
whether eth1 or eth0 is used.   The reason for using a baud rate other
than 115200 is for plugging in certain UPS models.  This problem only
seems to happen when using ttyS0.  I'd be really curious to know if
anyone has seen anything like this on the Axis board, or if you might be
able to offer any suggestions on what else to look for.

  if((p = pcap_open_live("eth1", BUFSIZ, 1 /*promiscuous*/, 10000 /*tmt in
ms*/, errbuf)) == NULL) {
    fprintf(stderr, "pcap_open_live failed. '%s'\n", errbuf);
    return -1;
  }
  if(pcap_lookupnet("eth1", &localnet, &netmask, errbuf) < 0) {
    fprintf(stderr, "pcap_lookupnet failed. '%s'\n", errbuf);
  }

  fprintf(stderr, "calling pcap_compile\n");
  if(pcap_compile(p, &filterFunc, "udp port 53", 1, netmask) < 0) {
    fprintf(stderr, "pcap_compile failed. '%s'\n", errbuf);
    pcap_close(p);
    return -1;
  }
  fprintf(stderr, "calling pcap_setfilter\n");
  if(pcap_setfilter(p, &filterFunc) < 0) {
    fprintf(stderr, "pcap_setfilter failed. '%s'\n", errbuf);
    pcap_close(p);
    return -1;
  }

Dmesg excerpt:

eth0 initialized
eth0: changed MAC to 00:40:8C:CD:00:00
ETRAX 100LX serial-driver 1.58 $, (c) 2000-2003 Axis Communications AB
ttyS0 at 0xb0000060 is a builtin UART with DMA
ttyS2 at 0xb0000070 is a builtin UART with DMA
ttyS3 at 0xb0000078 is a builtin UART with DMA


[root@AxisProduct /usr/qovia]410# cat /proc/interrupts
 2:      11008 + timer, + gpio poll
 6:          0   ETRAX 100LX built-in ethernet controller
 8:          0 + serial
11:          0 + gpio PA
16:        225   ETRAX 100LX built-in ethernet controller
17:        357   ETRAX 100LX built-in ethernet controller
18:          0 + serial 2 dma tr
19:          0 + serial 2 dma rec
20:          0 + serial 3 dma tr
21:          0 + serial 3 dma rec
22:        347 + serial 0 dma tr
23:          0 + serial 0 dma rec
24:     101328   ETRAX 100LX built-in USB (Tx)
25:       1617   ETRAX 100LX built-in USB (Rx)
31:     108764   ETRAX 100LX built-in USB (HC)