AnsweredAssumed Answered

unable to configure UART1 on LPC1124 microcontroller

Question asked by pascal carreweyn on Apr 5, 2019
Latest reply on Apr 17, 2019 by jeremyzhou

This piece of code works perfect to setup UART0.  After this the UART0 works just fine.

 

/* Setup UART for 9600 */
Chip_UART_Init(LPC_UART0);
Chip_UART_SetBaud(LPC_UART0, 9600);
Chip_UART_ConfigData(LPC_UART0, (UART_LCR_WLEN8 | UART_LCR_SBS_1BIT));
Chip_UART_SetupFIFOS(LPC_UART0, (UART_FCR_FIFO_EN | UART_FCR_TRG_LEV2));
Chip_UART_TXEnable(LPC_UART0);

 

The piece of code underneath doesn't effect the UART1 registers at all  ? What could be the reason of this ? I just changed the UART0 to UART1 and if i debug i can see the addresses are right... 

 

Chip_UART_Init(LPC_UART1);
Chip_UART_SetBaud(LPC_UART1, 9600);
Chip_UART_ConfigData(LPC_UART1, (UART_LCR_WLEN8 | UART_LCR_SBS_1BIT));
Chip_UART_SetupFIFOS(LPC_UART1, (UART_FCR_FIFO_EN | UART_FCR_TRG_LEV2));
Chip_UART_TXEnable(LPC_UART1);

Outcomes