Xenomai: Real-Time Serial Driver for 16550A


1 post
by jed » Wed Oct 31, 2012 9:57 am
Hi all,

I'm using my Raspberry Pi with a kernel (3.2.21-ipipe) patched by Adeos and Xenomai (2.6.1) . I would like to use serial port with RTDM (Real Time Driver Model) but i'm facing some difficulties.

I used this tutorial "http://www.acadis.org/pages/captain.at/serial-port-example" to configure my system.

What have been done :
- I enabled the 16440A UART driver and configured the hardware acces mode on Memory-mapped I/O

- Looking in the kernel log to find the MMIO and the IRQ
dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3

- disable the kernel serial port driver :
setserial /dev/ttyAMA0 uart none

- I loaded the xeno_16550A module
modprobe xeno_16550A mem=0x20201000 irq=83 start_index=0 baud_base=115200

The module seem to be well loaded
root@jedPI:~/rtserial# cat /proc/xenomai/rtdm/named_devices
Hash Name Driver /proc
60 rtser0 xeno_16550A rtser0

Finally, i compiled and loaded this software : (http://powet.eu/raspberrypi/cross_link.c)

I have always this error message " Connection timed out"

root@jedPI:~/examples# ./cross_link
main : write-config written
main : read-file opened
main : read-config written
main : read-task created
main : starting read-task
Nr | write->irq | irq->read | write->read |
-----------------------------------------------------------
read_task: error on RTSER_RTIOC_WAIT_EVENT, Connection timed out
read_task: error on RTSER_RTIOC_WAIT_EVENT, Connection timed out
read_task: error on RTSER_RTIOC_WAIT_EVENT, Connection timed out

I also found that the number of interrupts does not increase, but also I'm sure the Atmega328 is sending data.
root@jedPI:~# cat /proc/xenomai/irq
IRQ CPU0
3: 1275474 [timer]
83: 0 rtser0
259: 248 [virtual]

I think that the interrupts are not triggered but i don't why.

Thank you for your help

JeD
Posts: 1
Joined: Wed Jul 25, 2012 9:47 am