Sponsored Content
Top Forums UNIX for Dummies Questions & Answers setserial not working on linux running on Beagleboard (ARM development board) Post 302569229 by julumme on Sunday 30th of October 2011 10:15:37 AM
Old 10-30-2011
setserial not working on linux running on Beagleboard (ARM development board)

Hi,

I'm trying to develop an application to work with serial infra-red module, but I'm having difficulties to even get my module started. My HW is Beagleboard, which has 1 UART serial port, normally used for console, which I have disabled (I re-created the boot.scr, without the console arguments), and I have modified the getty config, not to try to attach to ttyO2.
On 3.x omap kernels, the serial port is now called ttyOx instead of ttySx, though I guess that doesn't really matter ? I guess the port and irq are the most important things..

During boot, I can see following information regarding the configuration:
Code:
[    0.000000] Kernel command line: console=tty0 root=/dev/mmcblk0p2 rootwait ro vram=12MB omapfb.mode=dvi:1280x720MR-16@60 fixrtc buddy=none mpurate=auto
[    0.000000] console [tty0] enabled
[    0.768524] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[    0.768768] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[    0.769012] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
[    0.769226] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3

When system tries to load the lirc module (for infra-red) I get this
complain about IRQ being busy:
Code:
[   12.396392] lirc_serial: IRQ 74 busy

Now, I'm not sure now why that is still happening, as I think nobody should be connected to ttyO2 anymore. But anyway, around internet people say I should release the UART manually, and I try it with setserial, with strange reply:
Code:
ubuntu@omap:/etc$ sudo setserial /dev/ttyO2 uart none
Cannot set serial info: Invalid argument

If I try without sudo, I get "Permission denied"

Also strangely, when I try to look at the port status:
Code:
ubuntu@omap:/etc$ sudo setserial -g /dev/ttyO[0-3]
/dev/ttyO0, UART: undefined, Port: 0x0000, IRQ: 72
/dev/ttyO1, UART: undefined, Port: 0x0000, IRQ: 73
/dev/ttyO2, UART: undefined, Port: 0x0000, IRQ: 74
/dev/ttyO3, UART: undefined, Port: 0x0000, IRQ: 80

Shoudn't there be something in those port addresses ?
Does it matter that "MMIO" is used ? Normally IO port seems to be indeed 0x**** format, now the address for serial port is much higher (0x********)

Any ideas how I should proceed ?

Last edited by julumme; 10-30-2011 at 11:16 AM.. Reason: -
 

9 More Discussions You Might Find Interesting

1. Linux Benchmarks

P4 2.6C Asus P4C800 M/board on Gentoo Linux

Here is my bench result. I also have a suspect file-copy result (giving me an index of 0.0) which would significantly drop the overall average. Anyway, if someone comes up with a reason as to why this may be, please let me know. Notes ... (0 Replies)
Discussion started by: greg32
0 Replies

2. Linux

jsp not working on linux running tomcat server

hey there we cant seem to get jsp to load pages properly on linux running tomcat 4 server. everytime we run .jsp files, the source code comes up instead of the actual file contents. any suggestions?? cheers mile1982 (1 Reply)
Discussion started by: mile1982
1 Replies

3. Linux

How to drive a LCD on ARM based linux System

Hello sir, I am Vijay Manohar. I am a writing a device driver for LCD frame buffer device. In this , LCD has been mapped at physical address 0x3000000. Now I want to implement mmap entry point. I have two questions regarding this Can I use this physical address as one of the parameters to... (0 Replies)
Discussion started by: VijayManohar
0 Replies

4. Programming

When a process is down - how to get a coredump in arm board?

Running a multi-threaded program in my arm board one day or more ,The process down . In order to get a coredump to analysis of the stack , . I use commands ulimited -c unlimited . but when the process down . no coredump But I write a test #include <stdio.h> int main(void){ ... (14 Replies)
Discussion started by: aobai
14 Replies

5. UNIX for Advanced & Expert Users

Trace "free(): invalid next size (normal)" error on arm-linux board

Hi guys, i'm running a program on samsumg 6410 arm cpu board. it caused an "free(): invalid next size (normal)" fail. i try to use gdb for remote debugging: 1, start gdb server on board: gdbserver 192.168.1.20:1234 ./HostAP Process ./HostAP created; pid = 499 Listening on port... (8 Replies)
Discussion started by: ss1969
8 Replies

6. What is on Your Mind?

Raspberry Pi - An ARM GNU/Linux box for $25. Take a byte!

Raspberry Pi An ARM GNU/Linux box for $25. Take a byte! FAQs What's a Raspberry Pi? The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It's a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets,... (5 Replies)
Discussion started by: Neo
5 Replies

7. Programming

Running c code in ARM QEMU

I created and Compiled a C program to run in QEMU for ARM. When I run the program using the command #qemu-arm -L /home/arm-2010.09/arm-none-linux-gnueabi/libc ./test it gives me the following error: If 'qemu-arm' is not a typo you can use command-not-found to lookup the package that contains... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

8. Hardware

Xenomai On ARM board EXYNOS 4210 ODROID-PC

Hi I am trying to port xenomai on exynos 4210 arm board. With some research I have found a way to port the board on the exynos board but the problem is that on the exynos-4210 website they have provided a patched version of linux-3.0.15 kernel for implementing on the board. On this kernel I am... (1 Reply)
Discussion started by: mohitjandwani
1 Replies

9. Programming

IDE's for the ARM processor on Linux

Hello everyone. I am running Debian on an ARM7 Device (aka my android phone). Everything is great. Works well. I would love to use it for Development. Mainly my interests are in Web Development, and Java development. So far the only useful IDE for debian arm is Netbeans. Which is pretty... (0 Replies)
Discussion started by: CDevelop
0 Replies
UART(4) 						   BSD Kernel Interfaces Manual 						   UART(4)

NAME
uart -- driver for Universal Asynchronous Receiver/Transmitter (UART) devices SYNOPSIS
device uart device puc device uart device scc device uart In /boot/device.hints: hint.uart.0.disabled="1" hint.uart.0.baud="38400" hint.uart.0.port="0x3f8" hint.uart.0.flags="0x10" With flags encoded as: 0x00010 device is potential system console 0x00080 use this port for remote kernel debugging 0x00100 set RX FIFO trigger level to ``low'' (NS8250 only) 0x00200 set RX FIFO trigger level to ``medium low'' (NS8250 only) 0x00400 set RX FIFO trigger level to ``medium high'' (default, NS8250 only) 0x00800 set RX FIFO trigger level to ``high'' (NS8250 only) DESCRIPTION
The uart device driver provides support for various classes of UARTs implementing the EIA RS-232C (CCITT V.24) serial communications inter- face. Each such interface is controlled by a separate and independent instance of the uart driver. The primary support for devices that contain multiple serial interfaces or that contain other functionality besides one or more serial interfaces is provided by the puc(4), or scc(4) device drivers. However, the serial interfaces of those devices that are managed by the puc(4), or scc(4) driver are each indepen- dently controlled by the uart driver. As such, the puc(4), or scc(4) driver provides umbrella functionality for the uart driver and hides the complexities that are inherent when elementary components are packaged together. The uart driver has a modular design to allow it to be used on differing hardware and for various purposes. In the following sections the components are discussed in detail. Options are described in the section that covers the component to which each option applies. CORE COMPONENT At the heart of the uart driver is the core component. It contains the bus attachments and the low-level interrupt handler. HARDWARE DRIVERS The core component and the kernel interfaces talk to the hardware through the hardware interface. This interface serves as an abstraction of the hardware and allows varying UARTs to be used for serial communications. SYSTEM DEVICES System devices are UARTs that have a special purpose by way of hardware design or software setup. For example, Sun UltraSparc machines use UARTs as their keyboard interface. Such an UART cannot be used for general purpose communications. Likewise, when the kernel is configured for a serial console, the corresponding UART will in turn be a system device so that the kernel can output boot messages early on in the boot process. KERNEL INTERFACES The last but not least of the components is the kernel interface. This component ultimately determines how the UART is made visible to the kernel in particular and to users in general. The default kernel interface is the TTY interface. This allows the UART to be used for termi- nals, modems and serial line IP applications. System devices, with the notable exception of serial consoles, generally have specialized ker- nel interfaces. HARDWARE
The uart driver supports the following classes of UARTs: o NS8250: standard hardware based on the 8250, 16450, 16550, 16650, 16750 or the 16950 UARTs. o SCC: serial communications controllers supported by the scc(4) device driver. FILES
/dev/ttyu? for callin ports /dev/ttyu?.init /dev/ttyu?.lock corresponding callin initial-state and lock-state devices /dev/cuau? for callout ports /dev/cuau?.init /dev/cuau?.lock corresponding callout initial-state and lock-state devices SEE ALSO
puc(4), scc(4) HISTORY
The uart device driver first appeared in FreeBSD 5.2. AUTHORS
The uart device driver and this manual page were written by Marcel Moolenaar <marcel@xcllnt.net>. BSD
March 12, 2008 BSD
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy