Skip to content

Commit

Permalink
Moving to UART 3 fixed the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldegrasse committed Aug 13, 2020
1 parent 0aca6ea commit e416a16
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ extern "C" {
#define Board_USBDEVICE EK_TM4C123GXL_USBDEVICE

#define Board_UART0 EK_TM4C123GXL_UART0
#define Board_UART2 EK_TM4C123GXL_UART2
#define Board_UART3 EK_TM4C123GXL_UART3

#define Board_WATCHDOG0 EK_TM4C123GXL_WATCHDOG0

Expand Down
12 changes: 6 additions & 6 deletions EK_TM4C123GXL.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ const UARTTiva_HWAttrs uartTivaHWAttrs[EK_TM4C123GXL_UARTCOUNT] = {
.ringBufSize = sizeof(uartTivaRingBuffer[0])
},
{
.baseAddr = UART2_BASE,
.intNum = INT_UART2,
.baseAddr = UART3_BASE,
.intNum = INT_UART3,
.intPriority = (~0),
.flowControl = UART_FLOWCONTROL_NONE,
.ringBufPtr = uartTivaRingBuffer[1],
Expand Down Expand Up @@ -645,10 +645,10 @@ void EK_TM4C123GXL_initUART(void)
GPIOPinConfigure(GPIO_PA1_U0TX);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
/* Enable UART 2 as well */
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART2);
GPIOPinConfigure(GPIO_PD6_U2RX);
GPIOPinConfigure(GPIO_PD7_U2TX);
GPIOPinTypeUART(GPIO_PORTD_BASE, GPIO_PIN_6 | GPIO_PIN_7);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART3);
GPIOPinConfigure(GPIO_PC6_U3RX);
GPIOPinConfigure(GPIO_PC7_U3TX);
GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_6 | GPIO_PIN_7);

/* Initialize the UART driver */
#if TI_DRIVERS_UART_DMA
Expand Down
2 changes: 1 addition & 1 deletion EK_TM4C123GXL.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ typedef enum EK_TM4C123GXL_SPIName {
*/
typedef enum EK_TM4C123GXL_UARTName {
EK_TM4C123GXL_UART0 = 0,
EK_TM4C123GXL_UART2 = 1,
EK_TM4C123GXL_UART3 = 1,

EK_TM4C123GXL_UARTCOUNT
} EK_TM4C123GXL_UARTName;
Expand Down
2 changes: 1 addition & 1 deletion uart_console_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

// UART configuration.
#define BAUD_RATE 115200
#define UART_DEV Board_UART2
#define UART_DEV Board_UART0

static UART_Handle uart;
static UART_Params params;
Expand Down
6 changes: 3 additions & 3 deletions uart_logger_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* to an SD card log file.
*
* Pins Required:
* PD6- UART RX
* PD7- UART TX
* PC6- UART RX
* PC7- UART TX
*/

/* XDCtools Header files */
Expand All @@ -27,7 +27,7 @@

// UART configuration.
#define LOG_BAUD_RATE 115200
#define UART_LOGDEV Board_UART0
#define UART_LOGDEV Board_UART3
// Number of bytes to read from the UART before flushing to SD card.
#define READSIZE 16

Expand Down

0 comments on commit e416a16

Please sign in to comment.