I am developing am3359 board based on BeagleBone and am3359evm schematic.
The board contains IrDA interface and should work under Linux (linux-3.2.0-psp04.06.00.08.sdk).
How I can configure /dev/ttyO2 in SIR IrDA mode?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am developing am3359 board based on BeagleBone and am3359evm schematic.
The board contains IrDA interface and should work under Linux (linux-3.2.0-psp04.06.00.08.sdk).
How I can configure /dev/ttyO2 in SIR IrDA mode?
Hi Oleg,
I haven't used IrDA with Linux, but here are some useful links:
http://www.tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html
http://www.tldp.org/HOWTO/html_single/Infrared-HOWTO/
You have to enable IrDA support inside the kernel as noted here.
Best regards,
Miroslav
Hi Miroslav!
Thank you for your links. But I already know it.
And I already read chapter 19 of Technical Reference Manual for AM335x.
From 19.4 section I understand how I can write non-OS application to work with IrDA.
But I don't understand how I can set SIR mode in MDR1 register of UART under Linux.
Default UART mode (UART_OMAP_MDR1_16X_MODE or UART_OMAP_MDR1_13X_MODE) is set in serial driver for am335x (file kernel/drivers/tty/serial/omap-serial.c)
Header include/linux/serial_reg.h defines:
define UART_OMAP_MDR1_SIR_MODE 0x01 /* SIR mode */
But this define is never used in all kernel tree.
So I don't understand what is mechanism to change MDR1 register into am335x serial driver or another utility like stty?
Best regards,
Oleg.
I don't know if a user-space tool that can do this exists. However, you can change the register value by writing directly to it in the kernel driver, using writel().
Best regards,
Miroslav
Hi Miroslav!
Thank you for your advice. I know function write() and can use it.
But why every user who need use IrDA mode in am335x family should modify TI serial driver yourself?
Is it good idea?
I found similar question: http://e2e.ti.com/support/arm/sitara_arm/f/791/t/233134.aspx
Is it actually IrDA mode not implemented in TI serial driver?
Best regards,
Oleg.