AnsweredAssumed Answered

How do you setup USART4 for use in ring buffer LPCOpen example?

Question asked by Kevin Gardner on Mar 28, 2020
Latest reply on Apr 7, 2020 by Sabina Bruce

Hello,

I'm using a UART example from LPCOpen 3.03 LPCXpresso 11U68 and I'm not seeing the correct output echoed back to my COM terminal. 

 

My configuration:

1) MCUXpresso IDE v11.1.1 [Build 3241]

2) periph_uart_n_rb example from v3.03 of LPCOpen examples

3) I'm using USART4 so that I could plug wires directly into the Arduino header instead of soldering. I modified three lines of code in uart_n_rb.c to configure for USART4

   - #define LPC_USART       LPC_USART4

   - Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 12, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGMODE_EN));
   - Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 11, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGMODE_EN));

4) Connected pins PIO2_11 and PIO2_12 to USB to serial adapter connected to my PC

5) My COM terminal settings are 115200 speed, 8 bits, no parity, 1 stop bit, no flow control

 

When I run the example I can see 31 characters in my COM terminal, and these characters are the same every time I run it. When I type in the terminal it echoes back the wrong character. Normally I'd bring this to work and look at it on a scope, but I'm in a shelter in place order so I can't go into the office

 

Any ideas?

 

Kevin

Outcomes