<?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: LPC1549 UART example in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-UART-example/m-p/1450555#M48586</link>
    <description>&lt;P&gt;Thank you, that made it work &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;I just wonder if the example is missing that or if I didn't copy and paste properly...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 08:43:53 GMT</pubDate>
    <dc:creator>EduardoGoncalves1966</dc:creator>
    <dc:date>2022-04-28T08:43:53Z</dc:date>
    <item>
      <title>LPC1549 UART example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-UART-example/m-p/1450126#M48578</link>
      <description>&lt;P&gt;I have this small example to initialise the UART of a LPC1549, 48 pins. This is a modification of the example supplied for the LPC1549 board from&amp;nbsp;lpcopen_2_20_lpcxpresso_nxp_lpcxpresso_1549/periph_uart_rb&lt;/P&gt;&lt;P&gt;For whatever reason the Tx interrupts are being generated but nothing comes out on the Tx line.&lt;/P&gt;&lt;P&gt;I'm using Tx in PIO0_15 pin 23 and Rx in PIO0_14 pin 22.&lt;/P&gt;&lt;P&gt;Can someone spot what is missing?&amp;nbsp; thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include "chip.h"&lt;BR /&gt;#include "uart_15xx.h"&lt;BR /&gt;#include "string.h"&lt;/P&gt;&lt;P&gt;/*****************************************************************************&lt;BR /&gt;* Private types/enumerations/variables&lt;BR /&gt;****************************************************************************/&lt;/P&gt;&lt;P&gt;/* Enable this define to use integer clocking instead of the fractional baud&lt;BR /&gt;rate generator */&lt;BR /&gt;#define USE_INTEGER_CLOCK&lt;/P&gt;&lt;P&gt;/* Transmit and receive ring buffers */&lt;BR /&gt;STATIC RINGBUFF_T txring, rxring;&lt;/P&gt;&lt;P&gt;/* Ring buffer size */&lt;BR /&gt;#define UART_RB_SIZE 64&lt;/P&gt;&lt;P&gt;/* Set the default UART, IRQ number, and IRQ handler name */&lt;BR /&gt;#define LPC_USART LPC_USART0&lt;BR /&gt;#define LPC_IRQNUM UART0_IRQn&lt;BR /&gt;#define LPC_UARTHNDLR UART0_IRQHandler&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Default baudrate for testing */&lt;BR /&gt;#define UART_TEST_DEFAULT_BAUDRATE 115200&lt;/P&gt;&lt;P&gt;/* Transmit and receive buffers */&lt;BR /&gt;static uint8_t rxbuff[UART_RB_SIZE], txbuff[UART_RB_SIZE];&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt;* @brief UART interrupt handler using ring buffers&lt;BR /&gt;* @return Nothing&lt;BR /&gt;*/&lt;BR /&gt;void UART0_IRQHandler(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 code if you need more capability. */&lt;BR /&gt;Chip_UART_IRQRBHandler(LPC_USART, &amp;amp;rxring, &amp;amp;txring);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;static void Init_UART(void)&lt;BR /&gt;{&lt;BR /&gt;/* Disables pullups/pulldowns and enable digitial mode */&lt;BR /&gt;Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 14, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGMODE_EN));&lt;BR /&gt;Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 15, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGMODE_EN));&lt;/P&gt;&lt;P&gt;/* UART signal muxing via SWM */&lt;BR /&gt;Chip_SWM_MovablePortPinAssign(SWM_UART0_RXD_I, 0, 14);&lt;BR /&gt;Chip_SWM_MovablePortPinAssign(SWM_UART0_TXD_O, 0, 15);&lt;/P&gt;&lt;P&gt;/* Use main clock rate as base for UART baud rate divider */&lt;BR /&gt;Chip_Clock_SetUARTBaseClockRate(Chip_Clock_GetMainClockRate(), false);&lt;/P&gt;&lt;P&gt;/* Setup UART */&lt;BR /&gt;Chip_UART_Init(LPC_USART0);&lt;BR /&gt;Chip_UART_ConfigData(LPC_USART0, UART_CFG_DATALEN_8 | UART_CFG_PARITY_NONE | UART_CFG_STOPLEN_1);&lt;BR /&gt;Chip_UART_SetBaud(LPC_USART0, 115200);&lt;BR /&gt;Chip_UART_Enable(LPC_USART0);&lt;BR /&gt;Chip_UART_TXEnable(LPC_USART0);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/**&lt;BR /&gt;* @brief Main UART program body&lt;BR /&gt;* @return Always returns 1&lt;BR /&gt;*/&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;SystemCoreClockUpdate();&lt;BR /&gt;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_GPIO0);&lt;BR /&gt;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_MUX);&lt;BR /&gt;Chip_SYSCTL_PeriphReset(RESET_MUX);&lt;/P&gt;&lt;P&gt;Init_UART();&lt;/P&gt;&lt;P&gt;RingBuffer_Init(&amp;amp;rxring, rxbuff, 1, UART_RB_SIZE);&lt;BR /&gt;RingBuffer_Init(&amp;amp;txring, txbuff, 1, UART_RB_SIZE);&lt;/P&gt;&lt;P&gt;/* Enable receive data and line status interrupt */&lt;BR /&gt;Chip_UART_IntEnable (LPC_USART, UART_INTEN_RXRDY);&lt;BR /&gt;Chip_UART_IntDisable(LPC_USART, UART_INTEN_TXRDY);&lt;/P&gt;&lt;P&gt;/* Enable UART interrupt */&lt;BR /&gt;NVIC_EnableIRQ(UART0_IRQn);&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;//Chip_UART_SendRB(LPC_USART, &amp;amp;txring, "Ola\n\r", 5);&lt;BR /&gt;Chip_UART_SendRB(LPC_USART, &amp;amp;txring, "U", 1);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 20:59:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-UART-example/m-p/1450126#M48578</guid>
      <dc:creator>EduardoGoncalves1966</dc:creator>
      <dc:date>2022-04-27T20:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1549 UART example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-UART-example/m-p/1450271#M48581</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose that you do not enable the SWM and IOCON gated clock, pls set the bits 12 and 13 in SYSAHBCLKCTRL0 register with like SYSCON-&amp;gt;SYSAHBCLKCTRL0|=1&amp;lt;&amp;lt;12|1&amp;lt;&amp;lt;13 instruction, for detailed format, pls check the register definition.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1651109308946.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178241i81622700498FBEAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1651109308946.png" alt="xiangjun_rong_0-1651109308946.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 01:30:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-UART-example/m-p/1450271#M48581</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-04-28T01:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1549 UART example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-UART-example/m-p/1450555#M48586</link>
      <description>&lt;P&gt;Thank you, that made it work &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;I just wonder if the example is missing that or if I didn't copy and paste properly...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 08:43:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1549-UART-example/m-p/1450555#M48586</guid>
      <dc:creator>EduardoGoncalves1966</dc:creator>
      <dc:date>2022-04-28T08:43:53Z</dc:date>
    </item>
  </channel>
</rss>

