From a6d972c23dc7160331a4495011a73199eca59a9f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 15 Aug 2011 21:42:03 +0200 Subject: simtrace UART: set INACK flag to make sure we ignore any parity error As a SIM card tracer, we want to remain completely passive and thus not signal back parity errors with the ISO 7816 NACK. The UART INACK flag does exactly that... --- firmware/src/simtrace/iso7816_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/src/simtrace/iso7816_uart.c b/firmware/src/simtrace/iso7816_uart.c index cd1a2f0..67f8e0d 100644 --- a/firmware/src/simtrace/iso7816_uart.c +++ b/firmware/src/simtrace/iso7816_uart.c @@ -588,12 +588,12 @@ void iso_uart_clk_master(unsigned int master) if (master) { usart->US_MR = AT91C_US_USMODE_ISO7816_0 | AT91C_US_CLKS_CLOCK | AT91C_US_CHRL_8_BITS | AT91C_US_NBSTOP_1_BIT | - AT91C_US_CKLO; + AT91C_US_CKLO | AT91C_US_INACK; usart->US_BRGR = (0x0000 << 16) | 16; } else { usart->US_MR = AT91C_US_USMODE_ISO7816_0 | AT91C_US_CLKS_EXT | AT91C_US_CHRL_8_BITS | AT91C_US_NBSTOP_1_BIT | - AT91C_US_CKLO; + AT91C_US_CKLO | AT91C_US_INACK; usart->US_BRGR = (0x0000 << 16) | 0x0001; } } @@ -624,7 +624,7 @@ void iso_uart_init(void) /* ISO7816 T=0 mode with external clock input */ usart->US_MR = AT91C_US_USMODE_ISO7816_0 | AT91C_US_CLKS_EXT | AT91C_US_CHRL_8_BITS | AT91C_US_NBSTOP_1_BIT | - AT91C_US_CKLO; + AT91C_US_CKLO | AT91C_US_INACK; /* Disable all interrupts */ usart->US_IDR = 0xff; -- cgit v1.2.3