<?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: Using USART_0 on LPC54101J512 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-USART-0-on-LPC54101J512/m-p/1834142#M55727</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229316"&gt;@mimers19&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Firstly recommend you use debugger to debug your code, not directly program .hex file to run. Debug step by step to check issue.&lt;/P&gt;
&lt;P&gt;2) You can use Config tool inside MCUXpresso IDE to configure USART_0:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1711333293193.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/270068iD8B3A504ED6D230F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1711333293193.png" alt="Alice_Yang_0-1711333293193.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) Also can refer to UART SDK demo under LPC54102 .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_1-1711333332645.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/270069iF5EFF3A480F896A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_1-1711333332645.png" alt="Alice_Yang_1-1711333332645.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 02:22:19 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2024-03-25T02:22:19Z</dc:date>
    <item>
      <title>Using USART_0 on LPC54101J512</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-USART-0-on-LPC54101J512/m-p/1833780#M55719</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to get my MCU to communicate with my computer via a COM port, but so far, I've had no luck. My setup includes the MCUXpresso IDE, where I've activated the RX and TX pins. Additionally, I've configured USART communication, which resulted in the following configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const usart_config_t USART0_config = {&lt;BR /&gt;.baudRate_Bps = 115200UL,&lt;BR /&gt;.syncMode = kUSART_SyncModeDisabled,&lt;BR /&gt;.parityMode = kUSART_ParityDisabled,&lt;BR /&gt;.stopBitCount = kUSART_OneStopBit,&lt;BR /&gt;.bitCountPerChar = kUSART_8BitsPerChar,&lt;BR /&gt;.loopback = false,&lt;BR /&gt;.enableRx = true,&lt;BR /&gt;.enableTx = true,&lt;BR /&gt;.clockPolarity = kUSART_RxSampleOnFallingEdge,&lt;BR /&gt;.enableContinuousSCLK = false,&lt;BR /&gt;.fifoConfig = {&lt;BR /&gt;.enableRxFifo = false,&lt;BR /&gt;.rxFifoSize = 4U,&lt;BR /&gt;.rxFifoThreshold = 1U,&lt;BR /&gt;.enableTxFifo = true,&lt;BR /&gt;.txFifoSize = 4U,&lt;BR /&gt;.txFifoThreshold = 0U&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;static void USART0_init(void) {&lt;BR /&gt;// USART0 peripheral initialization&lt;BR /&gt;USART_Init(USART0_PERIPHERAL, &amp;amp;USART0_config, USART0_CLOCK_SOURCE);&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;I then wrote a simple program intending to upload a file:&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include "board.h"&lt;BR /&gt;#include "peripherals.h"&lt;BR /&gt;#include "pin_mux.h"&lt;BR /&gt;#include "clock_config.h"&lt;BR /&gt;#include "LPC54101.h"&lt;BR /&gt;#include "fsl_debug_console.h"&lt;BR /&gt;#include "fsl_usart.h"&lt;/P&gt;&lt;P&gt;int main(void) {&lt;BR /&gt;// Initialize board hardware.&lt;BR /&gt;BOARD_InitBootPins();&lt;BR /&gt;BOARD_InitBootClocks();&lt;BR /&gt;BOARD_InitBootPeripherals();&lt;BR /&gt;#ifndef BOARD_INIT_DEBUG_CONSOLE_PERIPHERAL&lt;BR /&gt;// Initialize FSL debug console.&lt;BR /&gt;BOARD_InitDebugConsole();&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;// Sending some bytes via USART0&lt;BR /&gt;for (uint8_t i = 0; i &amp;lt; 15; i++) {&lt;BR /&gt;uint8_t data = 41 + i;&lt;BR /&gt;USART_WriteByte(USART0, data);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following the steps outlined in &lt;A href="https://community.nxp.com/t5/Blog/Hex-file-settings-in-MCUxpresso/ba-p/1131123" target="_self"&gt;this guide&lt;/A&gt;, I compiled my project and obtained a .hex file. I then used FlashMagic to upload the code to my LPC54101J512.&lt;/P&gt;&lt;P&gt;Despite not receiving any errors from the compiler or FlashMagic, and even after trying three different USB &amp;lt;-&amp;gt; UART converters, I'm not seeing any results.&lt;/P&gt;&lt;P&gt;Can anyone pinpoint what I might be doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 Mar 2024 13:48:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Using-USART-0-on-LPC54101J512/m-p/1833780#M55719</guid>
      <dc:creator>mimers19</dc:creator>
      <dc:date>2024-03-22T13:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using USART_0 on LPC54101J512</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-USART-0-on-LPC54101J512/m-p/1834142#M55727</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229316"&gt;@mimers19&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Firstly recommend you use debugger to debug your code, not directly program .hex file to run. Debug step by step to check issue.&lt;/P&gt;
&lt;P&gt;2) You can use Config tool inside MCUXpresso IDE to configure USART_0:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1711333293193.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/270068iD8B3A504ED6D230F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1711333293193.png" alt="Alice_Yang_0-1711333293193.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) Also can refer to UART SDK demo under LPC54102 .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_1-1711333332645.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/270069iF5EFF3A480F896A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_1-1711333332645.png" alt="Alice_Yang_1-1711333332645.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 02:22:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Using-USART-0-on-LPC54101J512/m-p/1834142#M55727</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-03-25T02:22:19Z</dc:date>
    </item>
  </channel>
</rss>

