Dear forum,
I have struggled for 4 days and I am out of ideas/suggestions on how to make this xeno_16550A driver work.
Questions from Xenomai forum is:
From the TRM it seems that the 16550 compliant UART accommodates byte accesses.
When installing and removing serial port drivers I can't see any associated clock enabling options in the menuconfig.
Please advise.
Best regards
Terje Froysa
debian@beaglebone:/boot$ sudo setserial /dev/ttyO2 uart none
Cannot set serial info: Invalid argument
Hello again,
While having problems with the command:
setserial /dev/ttyOx usart none
I started to look at /lib/modprobe.d/aliases.conf
I wonder if it is possible to set the xeno_16550A as an alias to the major number 248 (ttyOx):
alias char-major-248-1 xeno_16540A
alias char-major-248-2 xeno_16540A
alias char-major-248-4 xeno_16540A
Would this be a feasible solution for installing the xeno_16550A driver instead of the omap_usart driver?
Best regards
Terje
------------------------------------------------------------------
debian@beaglebone:/lib/modprobe.d$ more aliases.conf
# These are the standard aliases for devices and kernel drivers.
# This file does not need to be modified.
#
# No new aliases should be added to this file, please file a bug against
# the kernel for any aliases which are still not built-in.
:
# character devices ##########################################################
alias char-major-10-1 psmouse
:
#alias char-major-240-* hsfserial
#alias char-major-241-* hsfserial
lrwxrwxrwx 1 root root 0 Nov 12 13:41 /sys/dev/char/248:4/device/driver -> ../../../bus/platform/drivers/omap_uart
Do the aliases require the kernel module to be included in the kernel or am I barking up the wrong tree?
Please advice anyone...
Regards
Terje
Hello again,
While having problems with the command:
setserial /dev/ttyOx usart none
I started to look at /lib/modprobe.d/aliases.conf
I wonder if it is possible to set the xeno_16550A as an alias to the major number 248 (ttyOx):
alias char-major-248-1 xeno_16550A
alias char-major-248-2 xeno_16550A
alias char-major-248-4 xeno_16550A
At first sight, I would say that the omap_serial driver does not implement the necessary support (probably some ioctls), for what setserial is trying to do.
I see several ways out:
- implement the missing support in omap serial so that you can use the "setserial none" command;
- try and use the 8250 driver instead of the omap_serial driver, since the omap serial devices are 8250 compatible, this driver supports the necessary ioctls for the "setserial none" command to work. At some point in time, I know using this serial driver for the kernel console worked, but I do not know if it was by chance (u-boot enables the clock, so the driver does not have to enable it), and if it still works;
- do not enable any uart in the kernel configuration, neither omap_serial, nor 8250, and arrange for the clocks to be started before loading the xeno_16550a driver.
I just had a quick look at the omap-serial.c driver and:
- it does not do anything that I can see to enable its
clocks
- it does NOT use
byte access but word access, that is, its registers are 16 bits wide.
Unfortunately, as far as I can tell, the xeno_16550A
driver only supports byte access. So, if you want it to work, you have to
modify the driver to accept a "regshift" parameter applied to all
offsets and use the corresponding readw if regshift is 2 or readl if regshift
is 4.
Hello Cédric
Sorry, but I had to give up my ambitions due to time pressure.
I ended up using the standard UART drivers in the Debian environment.
If you are in the same application situation as me, you may consider using standard Linux drivers:
I am implementing a sensor platform where the sensors each issues hardware interrupts that marks the time of measurement.
Sensors are: GPS (1Hz), Barometer (1Hz), Gyro-/Accelero-/Magneto-meter (4Hz-8KHz), Inertial platform (200Hz), SwarmRadio (10Hz?).
UART: GPS + SwarmRadio
I2C: Barometer + Gyro-/Accelero-/Magneto-meter
IMU: SPI
After each GPIO interrupt the data is collected by UART, I2C and SPI.
The most important rea-time task is to relate the hardware interrupts (i.e. the collected data) to a common timer.
I managed to do that by writing kernel RTDMs for the interrupting GPIO-lines.
The sensor tasks issues blocking reads towards the RTDMs that sends the timer-value from the interrupts.
The tasks then uses the standard Linux drivers for collecting data.
So far, the only driver causing marginal situations is the SPI driver in combination with an Inertial Measuring Unit (IMU).
This sensor operates on 200Hz, hence I have to collect its data within 5ms.
The IMU uses 16-bit transfers, but require the chip-select to go in-active for at least 2us between each transfer.
This cannot be handled by the standard SPI driver an forces me to generate separate 16-bit transfer calls to the driver.
Each call gives a 20-30us kernel/user-space punishment and a very jittering total transfer-time.
Bottom line (for me) is that I have to cope with the standard Linux drivers for the time being.
I am now running tests on all interfaces and the only sensors that misses interrupts is the SPI-bus.
I am not sure how degrading these standard drivers is for my real-time requirement, but I hope to reveal this by some long-term testing.
At the moment I am part of the "under-wood" and must rely on the patient support from the "tall trees" (Gilles and Robert).
If time allows later on, I will look into the possibilities of doing some work on the drivers.
First driver to get my attention will be the SPI driver...
Bon chance!
Best regards
Terje
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/beagleboard/l2sKZCHEXbU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.