<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LPC4078 UART1 RXD PROBLEM in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4078-UART1-RXD-PROBLEM/m-p/673979#M26984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for checking it out. It narrows it down and helps me quite a bit with these crazy deadlines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jun 2017 03:03:23 GMT</pubDate>
    <dc:creator>istvanmate</dc:creator>
    <dc:date>2017-06-08T03:03:23Z</dc:date>
    <item>
      <title>LPC4078 UART1 RXD PROBLEM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4078-UART1-RXD-PROBLEM/m-p/673977#M26982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I built 2 prototype boards using the&amp;nbsp;LPC 4078 and when I run the example code &lt;STRONG&gt;periph_uart_rb&lt;/STRONG&gt; ( for Embedded Artists' LPC4088 Developer's Kit:) &amp;nbsp;in LPCXpresso it transmits the string &lt;EM&gt;&lt;STRONG&gt;"LPC17xx/40xx UART example using ring buffers \r\n"&lt;/STRONG&gt;&lt;/EM&gt;; and &lt;SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;"Press a key to echo it back or ESC to quit\r\n"&lt;/EM&gt;&lt;/STRONG&gt;;&amp;nbsp;&lt;/SPAN&gt;to the PC but it won't receive anything sent from the PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code modified to use UART1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#if defined(BOARD_EA_DEVKIT_1788) || defined(BOARD_EA_DEVKIT_4088)&lt;BR /&gt;#define UART_SELECTION LPC_UART1&lt;BR /&gt;#define IRQ_SELECTION UART1_IRQn&lt;BR /&gt;#define HANDLER_NAME UART1_IRQHandler&lt;BR /&gt;#elif defined(BOARD_NXP_LPCXPRESSO_1769)&lt;BR /&gt;#define UAR3T_SELECTION LPC_UART3&lt;BR /&gt;#define IRQ_SELECTION UART3_IRQn&lt;BR /&gt;#define HANDLER_NAME UART3_IRQHandler&lt;BR /&gt;#else&lt;BR /&gt;#error No UART selected for undefined board&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Transmit and receive ring buffers */&lt;BR /&gt;STATIC RINGBUFF_T txring, rxring;&lt;/P&gt;&lt;P&gt;/* Transmit and receive ring buffer sizes */&lt;BR /&gt;#define UART_SRB_SIZE 128 /* Send */&lt;BR /&gt;#define UART_RRB_SIZE 32 /* Receive */&lt;/P&gt;&lt;P&gt;/* Transmit and receive buffers */&lt;BR /&gt;static uint8_t rxbuff[UART_RRB_SIZE], txbuff[UART_SRB_SIZE];&lt;/P&gt;&lt;P&gt;const char inst1[] = "LPC17xx/40xx UART example using ring buffers \r\n";&lt;BR /&gt;const char inst2[] = "Press a key to echo it back or ESC to quit\r\n";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void HANDLER_NAME(void)&lt;BR /&gt;{&lt;BR /&gt; /* Want to handle any errors? Do it here. */&lt;/P&gt;&lt;P&gt;/* Use default ring buffer handler. Override this with your own&lt;BR /&gt; code if you need more capability. */&lt;BR /&gt; Chip_UART_IRQRBHandler(UART_SELECTION, &amp;amp;rxring, &amp;amp;txring);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint8_t key;&lt;BR /&gt; int bytes;&lt;/P&gt;&lt;P&gt;SystemCoreClockUpdate();&lt;BR /&gt; Board_Init();&lt;BR /&gt; //Board_UART_Init(UART_SELECTION);&lt;/P&gt;&lt;P&gt;/******** Set up UART1 on Port 2 pin 0 TX and Pin 1 RX ****/&lt;BR /&gt; Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 0, (IOCON_FUNC2 | IOCON_MODE_INACT));&lt;BR /&gt; Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 1, (IOCON_FUNC2 | IOCON_MODE_INACT));&lt;BR /&gt; //Board_LED_Set(0, false);&lt;/P&gt;&lt;P&gt;/* Setup UART for 115.2K8N1 */&lt;BR /&gt; Chip_UART_Init(UART_SELECTION);&lt;BR /&gt; Chip_UART_SetBaud(UART_SELECTION, 115200);&lt;BR /&gt; Chip_UART_ConfigData(UART_SELECTION, (UART_LCR_WLEN8 | UART_LCR_SBS_1BIT));&lt;BR /&gt; Chip_UART_SetupFIFOS(UART_SELECTION, (UART_FCR_FIFO_EN | UART_FCR_TRG_LEV0));&lt;BR /&gt; Chip_UART_TXEnable(UART_SELECTION);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; /* Before using the ring buffers, initialize them using the ring&lt;BR /&gt; buffer init function */&lt;BR /&gt; RingBuffer_Init(&amp;amp;rxring, rxbuff, 1, UART_RRB_SIZE);&lt;BR /&gt; RingBuffer_Init(&amp;amp;txring, txbuff, 1, UART_SRB_SIZE);&lt;/P&gt;&lt;P&gt;/* Reset and enable FIFOs, FIFO trigger level 3 (14 chars) */&lt;BR /&gt; Chip_UART_SetupFIFOS(UART_SELECTION, (UART_FCR_FIFO_EN | UART_FCR_RX_RS | &lt;BR /&gt; UART_FCR_TX_RS | UART_FCR_TRG_LEV0));&lt;/P&gt;&lt;P&gt;/* Enable receive data and line status interrupt */&lt;BR /&gt; Chip_UART_IntEnable(UART_SELECTION, (UART_IER_RBRINT | UART_IER_RLSINT));&lt;/P&gt;&lt;P&gt;/* preemption = 1, sub-priority = 1 */&lt;BR /&gt; NVIC_SetPriority(IRQ_SELECTION, 1);&lt;BR /&gt; NVIC_EnableIRQ(IRQ_SELECTION);&lt;/P&gt;&lt;P&gt;/* Send initial messages */&lt;BR /&gt; Chip_UART_SendRB(UART_SELECTION, &amp;amp;txring, inst1, sizeof(inst1) - 1);&lt;BR /&gt; Chip_UART_SendRB(UART_SELECTION, &amp;amp;txring, inst2, sizeof(inst2) - 1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // Poll the receive ring buffer for the ESC (ASCII 27) key&lt;BR /&gt; key = 0;&lt;BR /&gt; while (key != 27)&lt;BR /&gt; {&lt;BR /&gt; bytes = Chip_UART_ReadRB(UART_SELECTION, &amp;amp;rxring, &amp;amp;key, 1);&lt;BR /&gt; if(bytes != 0)&lt;BR /&gt; {&lt;BR /&gt; Chip_UART_SendByte(UART_SELECTION, key);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; /* DeInitialize UART0 peripheral */&lt;BR /&gt; NVIC_DisableIRQ(IRQ_SELECTION);&lt;BR /&gt; Chip_UART_DeInit(UART_SELECTION);&lt;/P&gt;&lt;P&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to use UART1 instead of UART0 given in the example so I changed all references to UART1 and the transmit part works.&lt;/P&gt;&lt;P&gt;I am able to&amp;nbsp;verify&amp;nbsp;the incoming data on Pin59&amp;nbsp;P2[1] with the oscilloscope but when I look in the peripheral window UART1 -LSR - RDR shows empty. I also put a break point in the UART1 ISR but it never reaches it - the micro is not seeing the incoming data on UART1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both prototype boards behave the same way so it is highly unlikely&amp;nbsp;Pin 59 is blown on both boards. I&amp;nbsp;hope somebody could help me figure this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using:&amp;nbsp;&lt;STRONG&gt;LPCXpresso v7.9.0 [Build 455] [2015-07-23]&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Jun 2017 01:01:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4078-UART1-RXD-PROBLEM/m-p/673977#M26982</guid>
      <dc:creator>istvanmate</dc:creator>
      <dc:date>2017-06-04T01:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4078 UART1 RXD PROBLEM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4078-UART1-RXD-PROBLEM/m-p/673978#M26983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="300391" data-username="istvanmate" href="https://community.nxp.com/people/istvanmate"&gt;ISTVAN MATE&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: inherit; font-size: 15px; line-height: 1.5;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-size: 15px;"&gt;the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-size: 15px;"&gt;I don't have the LPC4088 OEM Board on hand, however I have the LPC1788 OEM Board and LPC4088 is compatible with LPC1788 except that the Cortex-M core.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-size: 15px;"&gt;I use your code, but the issue is not happened and the code work well.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-size: 15px;"&gt;So I'd highly recommend you to check the value of USART1 registers in LPCXpresso IDE when debugging the code, I think it will help you figure the root cause of the issue.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-size: 15px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2017-06-06_15-45-43.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20070i223FD9C0CC18E821/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-06-06_15-45-43.jpg" alt="2017-06-06_15-45-43.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 15px;"&gt;Have a great day,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;TIC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 07:43:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4078-UART1-RXD-PROBLEM/m-p/673978#M26983</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-06-06T07:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4078 UART1 RXD PROBLEM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4078-UART1-RXD-PROBLEM/m-p/673979#M26984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for checking it out. It narrows it down and helps me quite a bit with these crazy deadlines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2017 03:03:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4078-UART1-RXD-PROBLEM/m-p/673979#M26984</guid>
      <dc:creator>istvanmate</dc:creator>
      <dc:date>2017-06-08T03:03:23Z</dc:date>
    </item>
  </channel>
</rss>

