Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

UART Channels Other Then Default: TI-RTOS / LM4F120

$
0
0

Hello, I am wondering if there is anything special I need to do to setup UART1 through UART7?  Essentially, I am trying to make the uartecho example work with UART1.  Ultimately I need 3 channels to be active.

This is my initializationin LM4F120H5QR.c:

Void LM4F120H5QR_initUART1()
{
     /* Enable and configure the peripherals used by the uart. */
     SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
     GPIOPinConfigure(GPIO_PB0_U1RX);
     GPIOPinConfigure(GPIO_PB1_U1TX);
     GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);

     /* Initialize the UART driver */
     UART_init();
}

I added this value in LM4F120HQ5R.h:

typedef enum LM4F120H5QR_UARTName {
     LM4F120H5QR_UART0 = 0,
     LM4F120H5QR_UART1,

     LM4F120H5QR_UARTCOUNT
} LM4F120H5QR_UARTName;

This is my configuration of the channel:

/* Create a UART with data processing off. */
UART_Params_init(&uartParams);
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uart = UART_open(Board_UART1, &uartParams);

if (uart == NULL) {
    System_abort("Error opening the UART");
}

Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>