Hi,
I need help to configure UART1 RXD in CIR mode. Please find my settings below. I don't get any Interrupt. Please verify my settings.
#define DM814x_UART1_BASE (0x48022000u)
#define DM814x_PINMUX_BASE (0x48140000u)
unsigned int uart1_base = DM814x_UART1_BASE;
VDIR_BASE = ioremap(uart1_base, 0xfff);
printk("VDIR_BASE = 0x%x\n",VDIR_BASE);
PINMUX = ioremap(pinmux_base, 0x10000);
printk("PINMUX_BASE = 0x%x\n",PINMUX);
data = __raw_readl(PINMUX + 0x930);
data = 0x04;
__raw_writel(data, (PINMUX + 0x930));
/* Reset the UART from any previous state */
/* Reset Sequence */
UART_rset( VDIR_BASE, EFR, 0x10 );
UART_rset( VDIR_BASE, IER_OFFSET, 0 );
UART_rset( VDIR_BASE, MCR_OFFSET, 0 );
UART_rset( VDIR_BASE, EFR, 0 );
UART_rset( VDIR_BASE, LCR_OFFSET, 0 );
UART_rset( VDIR_BASE, MDR1_OFFSET, 0x07 );
efr_val = UART_rget(VDIR_BASE, EFR);
UART_rset(VDIR_BASE, EFR, (efr_val | 0x10)); // Enable enhanced features, allow access to IER[4:7], FCR[4:5], MCR[5:7]
UART_rset(VDIR_BASE, IER_OFFSET, 0x00); // Disable All Interrupts
UART_rset(VDIR_BASE, FCR_OFFSET, 0x57);
UART_rset(VDIR_BASE, LCR_OFFSET, 0x02);
UART_rset(VDIR_BASE, MCR_OFFSET, 0x00); // No MODEM Configuration
UART_rset(VDIR_BASE, MDR1_OFFSET, 0x07); // Disable UART
UART_rset(VDIR_BASE, DLL, 0x6B); // Configure the Baud Rate for Transfer
UART_rset(VDIR_BASE, DLH, 0x0A);
UART_rset(VDIR_BASE, MDR1_OFFSET, 0x06); // Select CIR Mode
UART_rset(VDIR_BASE, IER_OFFSET, 0x01); // Select RHR Interrupt Mode
It always reads LSR=0x81 and IIR=0x0.
Best Regards,
Rehan Khan