summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/tms320dm320/uart-dm320.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/firmware/target/arm/tms320dm320/uart-dm320.c b/firmware/target/arm/tms320dm320/uart-dm320.c
index 414072c929..6f83b7c3b7 100644
--- a/firmware/target/arm/tms320dm320/uart-dm320.c
+++ b/firmware/target/arm/tms320dm320/uart-dm320.c
@@ -38,15 +38,20 @@ static volatile int uart1_receive_count, uart1_receive_read, uart1_receive_write
38 38
39void uart_init(void) 39void uart_init(void)
40{ 40{
41 /* Setup UART 1 pins:
42 * 27 - input, uart1 rx
43 * 28 - output, uart1 tx */
44 /* 27: input , non-inverted, no-irq, falling edge, no-chat, UART RX */
45 dm320_set_io(27, true, false, false, false, false, 0x01);
46
47 /* 28: output, non-inverted, no-irq, falling edge, no-chat, UART TX */
48 dm320_set_io(28, false, false, false, false, false, 0x01);
49
41 // 8-N-1 50 // 8-N-1
42 IO_UART1_MSR = 0xC400; 51 IO_UART1_MSR = 0xC400;
43 IO_UART1_BRSR = 0x0057; 52 IO_UART1_BRSR = 0x0057;
44 IO_UART1_RFCR = 0x8020; /* Trigger later */ 53 IO_UART1_RFCR = 0x8020; /* Trigger later */
45 IO_UART1_TFCR = 0x0000; /* Trigger level */ 54 IO_UART1_TFCR = 0x0000; /* Trigger level */
46 /* gio 27 is input, uart1 rx
47 gio 28 is output, uart1 tx */
48 IO_GIO_DIR1 |= (1<<11); /* gio 27 */
49 IO_GIO_DIR1 &= ~(1<<12); /* gio 28 */
50 55
51 /* init the receive buffer */ 56 /* init the receive buffer */
52 uart1_receive_count=0; 57 uart1_receive_count=0;
@@ -62,7 +67,6 @@ void uart_init(void)
62 IO_INTC_EINT0 |= INTR_EINT0_UART1; 67 IO_INTC_EINT0 |= INTR_EINT0_UART1;
63} 68}
64 69
65
66/* This function is not interrupt driven */ 70/* This function is not interrupt driven */
67void uart1_putc(char ch) 71void uart1_putc(char ch)
68{ 72{