lpcware

Can't get serial output to work.

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by gwlindberg on Fri Feb 05 16:58:09 MST 2016
We're trying to get serial debug output to work. We've got everything to compile and we can step through and everything looks good, just no output on the pins. We are using an LPC1517, currently running off of the internal RC osc pll'd to 72MHz.

It looks like something stupid has happened in the setup. 

We are using the board file from the Board_LPC1549_TQFP48 project.
WE have:
#define DEBUG_UART LPC_USART0

#if defined(DEBUG_UART)
    /* Disables pullups/pulldowns and enable digital mode */
    Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 14, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGMODE_EN));
    Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 15, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGMODE_EN));

    /* UART signal muxing via SWM */
    Chip_SWM_MovablePortPinAssign(SWM_UART0_RXD_I, 0, 14);
    Chip_SWM_MovablePortPinAssign(SWM_UART0_TXD_O, 0, 15);

    /* Use main clock rate as base for UART baud rate divider */
    Chip_Clock_SetUARTBaseClockRate(Chip_Clock_GetMainClockRate(), false);

    /* Setup UART */
    Chip_UART_Init(DEBUG_UART);
    Chip_UART_ConfigData(DEBUG_UART, UART_CFG_DATALEN_8 | UART_CFG_PARITY_NONE | UART_CFG_STOPLEN_1);
    Chip_UART_SetBaud(DEBUG_UART, 115200);
    Chip_UART_Enable(DEBUG_UART);
    Chip_UART_TXEnable(DEBUG_UART);
#endif

/* Sends a character on the UART */
void Board_UARTPutChar(char ch)
{
#if defined(DEBUG_UART)
    Chip_UART_SendBlocking(DEBUG_UART, &ch, 1);
#endif
}

The Board_UARTPutChar() routine is being called, but we get nothing on the pins.

Any insight would be appreciated.

Outcomes