IrDA mode for UART on Colibri iMX6 under Windows Embedded 2013

We have an IrDA transceiver TFDU4101 connected to UARTC (COM3) on Colibri iMX6. We are running Windows Embedded Compact 2013. Is there way to enable the IrDA mode on the serial port? Our application uses the raw IR port.


Dear @siva.alagarsamy

There are two standard ways to activate/deactivate IrDA mode for an UART in WinCE:

However, the iMX6 UART driver does currently (V1.3) not support IrDA at the moment, therefore the solutions mentioned above will not work. So far we didn’t have any request for IrDA, therefore we treated the implementation of IrDA to be of low importance.

As a workaround, you can access the UART registers directly after opeing the COM port, in order to activate the IrDA modulation.

Regards, Andy

Thanks for the response. For the UART to be in IrDA mode, is it all just the registers that needs to be set? I thought there are some interrupts that needs to be handled different by the driver for the IrDA.
Can we purchase Toradex support hours to add this feature to the driver?

Hi Andy,
I tried the following code to setup the registers after opening the serial port and still couldn’t get the IR to work. I was going with the settings described in the iMX6 manual

char * uartBase = (char *)Map_MapMemory(UART3_BASE, UART_ADDRESS_SPACE_SIZE);

//Set Enable IR bit in control register 1
//Bit 7 = 1  Enable IR interface
//Bit 2 = 1  Enable DMA
//Bit 0 = 1  Enable UART
DWORD regVal = 0x0085;
Map_MemoryWrite(uartBase + UCR1_OFFSET, regVal, 32);

//Clear the UART Test Register 
Map_MemoryWrite(uartBase + UTS_OFFSET, 0x0, 32);

//Setup FIFO Control Register
regVal = 0x0981;
Map_MemoryWrite(uartBase + UFCR_OFFSET, regVal, 32);

//Set control register 2
//Bit 14 = 1  ( Ignore level of RTS input signal )
//Bit 5 = 1   ( Characters are 8 bit length )
//Bit 2 = 1   ( Enable RX path )
//Bit 1 = 1   ( Enable TX path )
//Bit 0 = 1   ( No software reset )
regVal = 0x4027; 
Map_MemoryWrite(uartBase + UCR2_OFFSET, regVal, 32);

//Set Control register 3
regVal = 0x0000;
Map_MemoryWrite(uartBase + UCR3_OFFSET, regVal, 32);

//Set Inverted on RX in control register 4
regVal = 0x8201;
Map_MemoryWrite(uartBase + UCR4_OFFSET, regVal, 32);


Dear @siva.alagarsamy
You’re trying to do too much in your code.
Probably the only thing you need to do is

  1. Open the COM port
  2. Setting Bit 7 (Enable IR interface) using a read-modify-write operation
  3. Read/Write from/to the COM port.

Regards, Andy