AnsweredAssumed Answered

Is there a full example of UART0 setup for LPC1769?

Question asked by Larry Martin on Nov 27, 2019
Latest reply on Dec 2, 2019 by Alice_Yang

I am working with RFID board CLEV6630B, comprising LPC1769 and CLRC663Plus.  My software is from NxpNfcRdLib_RC663_LPC1769_v05.22.01_Full in SW297851.zip with only a few printf changes so far.  I am using the Basic Discovery Loop top level project with lpc_board_nxp_lpcxpresso_1769 and lpc_chip_175x_6x.

 

I want to activate the 3V3 level serial port on J201.  Per the schematics, that is connected to UART0.  Board.h comes with DEBUG_UART set to UART3.  The schematic says that UART3 is No Connect.  I have changed board.h to say:

#define DEBUG_UART LPC_UART0

 

After recompile, my 'scope says that both the TX and RX pins of J201 are steady during calls to Board_UARTPutSTR.  TX is steady at 2V2.  RX is steady at 3V3.  I suspect that there is a problem with pinmux.

 

Looks like pinmux is set up in board_sysinit.c:

STATIC const PINMUX_GRP_T pinmuxing[] = {

    {0,  0,   IOCON_MODE_INACT | IOCON_FUNC2},    /* TXD3 */
    {0,  1,   IOCON_MODE_INACT | IOCON_FUNC2},    /* RXD3 */

 

The LPC1769 User Manual has this pin description for UART0 TX:

P0[2]/TXD0/AD0[7] 79 [2] I/O P0[2] —

General purpose digital input/output pin.
O TXD0 — Transmitter output for UART0.

 

The mapping from PDF to PINMUX structure is not intuitive to me, and I'm not confident that all the clocks and interrupts are set up.  For example, Board_UART_Init is empty:

/* Initialize UART pins */
void Board_UART_Init(LPC_USART_T *pUART)
{
    /* Pin Muxing has already been done during SystemInit */
}

 

So the question is: is there a known-good example of LPC1769 UART0 setup somewhere in the ecosystem?

Thanks,

Larry

Outcomes