<?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: Issue with getting UART to work. SEMIHOSTING/REDLIB? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-with-getting-UART-to-work-SEMIHOSTING-REDLIB/m-p/1295892#M45576</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As you know that the uart0 signals can be routed to any PORT pins, on the LPC824_Xpresso board, the UART0_TX is routed to P0_7 of LPC824 as TARGET_TX-P0_7 node, then connected to PIO0_18 of UART0_RX of LPC11U35.&lt;/P&gt;
&lt;P&gt;The UART0_RX is routed to P0_18 of LPC824 as TARGET_RX-P0_18 node, then connected to PIO0_19 of UART0_TX of LPC11U35 as node LINK_TX by closing the pin2&amp;amp;3 of JP3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1624344011397.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147637iC45CBD227D2F287C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1624344011397.png" alt="xiangjun_rong_0-1624344011397.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_1-1624344167739.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147638iCDED84C88D16DCFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1624344167739.png" alt="xiangjun_rong_1-1624344167739.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When the LPC824 put character to UART0_TX pin, the LPC11U35 will receive the character, then transfer it via USB to PC. The mechanism for receiver is the same.&lt;/P&gt;
&lt;P&gt;You can route the UART0 TX/RX to the other pins via the code:&lt;/P&gt;
&lt;P&gt;1)The code can route the UART0 pin to P0_7 and P0_18 as the example code&lt;/P&gt;
&lt;P&gt;/* Enables clock for switch matrix.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;/P&gt;
&lt;P&gt;/* USART0_TXD connect to P0_7 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P0_7);&lt;/P&gt;
&lt;P&gt;/* USART0_RXD connect to P0_18 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P0_18);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)The code can route the UART0 pin to P0_26 and P0_25,&amp;nbsp; but you have to delete the above code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Enables clock for switch matrix.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;/P&gt;
&lt;P&gt;/* USART0_TXD connect to P0_26 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P0_26);&lt;/P&gt;
&lt;P&gt;/* USART0_RXD connect to P0_25 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P0_25);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_2-1624344715850.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147642i4782792A9C46236A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_2-1624344715850.png" alt="xiangjun_rong_2-1624344715850.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Pin_MUX.c&lt;/P&gt;
&lt;P&gt;void BOARD_InitPins(void)&lt;BR /&gt;{&lt;BR /&gt;/* Enables clock for IOCON block.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Iocon);&lt;BR /&gt;/* Enables clock for switch matrix.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;/P&gt;
&lt;P&gt;const uint32_t pio15_config = (/* Selects pull-up function */&lt;BR /&gt;IOCON_PIO_MODE_PULLUP |&lt;BR /&gt;/* Enable hysteresis */&lt;BR /&gt;IOCON_PIO_HYS_EN |&lt;BR /&gt;/* Input not invert */&lt;BR /&gt;IOCON_PIO_INV_DI |&lt;BR /&gt;/* Disables Open-drain function */&lt;BR /&gt;IOCON_PIO_OD_DI |&lt;BR /&gt;/* Bypass input filter */&lt;BR /&gt;IOCON_PIO_SMODE_BYPASS |&lt;BR /&gt;/* IOCONCLKDIV0 */&lt;BR /&gt;IOCON_PIO_CLKDIV0);&lt;BR /&gt;/* PORT1 PIN5 (coords: ) is configured as */&lt;BR /&gt;IOCON_PinMuxSet(IOCON, 15, pio15_config);&lt;/P&gt;
&lt;P&gt;const uint32_t pio30_config = (/* Selects pull-up function */&lt;BR /&gt;IOCON_PIO_MODE_PULLUP |&lt;BR /&gt;/* Enable hysteresis */&lt;BR /&gt;IOCON_PIO_HYS_EN |&lt;BR /&gt;/* Input not invert */&lt;BR /&gt;IOCON_PIO_INV_DI |&lt;BR /&gt;/* Disables Open-drain function */&lt;BR /&gt;IOCON_PIO_OD_DI |&lt;BR /&gt;/* Bypass input filter */&lt;BR /&gt;IOCON_PIO_SMODE_BYPASS |&lt;BR /&gt;/* IOCONCLKDIV0 */&lt;BR /&gt;IOCON_PIO_CLKDIV0);&lt;BR /&gt;/* PORT3 PIN0 (coords: ) is configured as */&lt;BR /&gt;IOCON_PinMuxSet(IOCON, 30, pio30_config);&lt;/P&gt;
&lt;P&gt;/* USART0_TXD connect to P0_7 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P0_7);&lt;/P&gt;
&lt;P&gt;/* USART0_RXD connect to P0_18 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P0_18);&lt;/P&gt;
&lt;P&gt;/* Disable clock for switch matrix. */&lt;BR /&gt;CLOCK_DisableClock(kCLOCK_Swm);&lt;BR /&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;</description>
    <pubDate>Tue, 22 Jun 2021 06:55:07 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2021-06-22T06:55:07Z</dc:date>
    <item>
      <title>Issue with getting UART to work. SEMIHOSTING/REDLIB?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-with-getting-UART-to-work-SEMIHOSTING-REDLIB/m-p/1295793#M45572</link>
      <description>&lt;P&gt;I am able to open and work with the debug UART on the LPC824 on the dev board rev C.&lt;/P&gt;&lt;P&gt;However when redirecting the usb uart pins RX/TX from 7 and 18 to my output pins it doesn't seem to be working. I've tied RX to TX physically and it hangs at waiting for the&amp;nbsp;getLineUART(recv_buf, sizeof(recv_buf)); on the UART example code.&lt;/P&gt;&lt;P&gt;I think my project is messed up with the semihosting/debug/redlib stuff.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Is it possible to get both working at the same time?&lt;/P&gt;&lt;P&gt;2. What library and configuration should I be targeting to get the regular UART to work? Should I disable the debug macro's? Do I need to rewrite the code to get regular UARTs to work?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 04:35:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-with-getting-UART-to-work-SEMIHOSTING-REDLIB/m-p/1295793#M45572</guid>
      <dc:creator>joe-mcg</dc:creator>
      <dc:date>2021-06-22T04:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with getting UART to work. SEMIHOSTING/REDLIB?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-with-getting-UART-to-work-SEMIHOSTING-REDLIB/m-p/1295892#M45576</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As you know that the uart0 signals can be routed to any PORT pins, on the LPC824_Xpresso board, the UART0_TX is routed to P0_7 of LPC824 as TARGET_TX-P0_7 node, then connected to PIO0_18 of UART0_RX of LPC11U35.&lt;/P&gt;
&lt;P&gt;The UART0_RX is routed to P0_18 of LPC824 as TARGET_RX-P0_18 node, then connected to PIO0_19 of UART0_TX of LPC11U35 as node LINK_TX by closing the pin2&amp;amp;3 of JP3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1624344011397.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147637iC45CBD227D2F287C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1624344011397.png" alt="xiangjun_rong_0-1624344011397.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_1-1624344167739.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147638iCDED84C88D16DCFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1624344167739.png" alt="xiangjun_rong_1-1624344167739.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When the LPC824 put character to UART0_TX pin, the LPC11U35 will receive the character, then transfer it via USB to PC. The mechanism for receiver is the same.&lt;/P&gt;
&lt;P&gt;You can route the UART0 TX/RX to the other pins via the code:&lt;/P&gt;
&lt;P&gt;1)The code can route the UART0 pin to P0_7 and P0_18 as the example code&lt;/P&gt;
&lt;P&gt;/* Enables clock for switch matrix.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;/P&gt;
&lt;P&gt;/* USART0_TXD connect to P0_7 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P0_7);&lt;/P&gt;
&lt;P&gt;/* USART0_RXD connect to P0_18 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P0_18);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)The code can route the UART0 pin to P0_26 and P0_25,&amp;nbsp; but you have to delete the above code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Enables clock for switch matrix.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;/P&gt;
&lt;P&gt;/* USART0_TXD connect to P0_26 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P0_26);&lt;/P&gt;
&lt;P&gt;/* USART0_RXD connect to P0_25 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P0_25);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_2-1624344715850.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147642i4782792A9C46236A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_2-1624344715850.png" alt="xiangjun_rong_2-1624344715850.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Pin_MUX.c&lt;/P&gt;
&lt;P&gt;void BOARD_InitPins(void)&lt;BR /&gt;{&lt;BR /&gt;/* Enables clock for IOCON block.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Iocon);&lt;BR /&gt;/* Enables clock for switch matrix.: 0x01u */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;/P&gt;
&lt;P&gt;const uint32_t pio15_config = (/* Selects pull-up function */&lt;BR /&gt;IOCON_PIO_MODE_PULLUP |&lt;BR /&gt;/* Enable hysteresis */&lt;BR /&gt;IOCON_PIO_HYS_EN |&lt;BR /&gt;/* Input not invert */&lt;BR /&gt;IOCON_PIO_INV_DI |&lt;BR /&gt;/* Disables Open-drain function */&lt;BR /&gt;IOCON_PIO_OD_DI |&lt;BR /&gt;/* Bypass input filter */&lt;BR /&gt;IOCON_PIO_SMODE_BYPASS |&lt;BR /&gt;/* IOCONCLKDIV0 */&lt;BR /&gt;IOCON_PIO_CLKDIV0);&lt;BR /&gt;/* PORT1 PIN5 (coords: ) is configured as */&lt;BR /&gt;IOCON_PinMuxSet(IOCON, 15, pio15_config);&lt;/P&gt;
&lt;P&gt;const uint32_t pio30_config = (/* Selects pull-up function */&lt;BR /&gt;IOCON_PIO_MODE_PULLUP |&lt;BR /&gt;/* Enable hysteresis */&lt;BR /&gt;IOCON_PIO_HYS_EN |&lt;BR /&gt;/* Input not invert */&lt;BR /&gt;IOCON_PIO_INV_DI |&lt;BR /&gt;/* Disables Open-drain function */&lt;BR /&gt;IOCON_PIO_OD_DI |&lt;BR /&gt;/* Bypass input filter */&lt;BR /&gt;IOCON_PIO_SMODE_BYPASS |&lt;BR /&gt;/* IOCONCLKDIV0 */&lt;BR /&gt;IOCON_PIO_CLKDIV0);&lt;BR /&gt;/* PORT3 PIN0 (coords: ) is configured as */&lt;BR /&gt;IOCON_PinMuxSet(IOCON, 30, pio30_config);&lt;/P&gt;
&lt;P&gt;/* USART0_TXD connect to P0_7 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P0_7);&lt;/P&gt;
&lt;P&gt;/* USART0_RXD connect to P0_18 */&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P0_18);&lt;/P&gt;
&lt;P&gt;/* Disable clock for switch matrix. */&lt;BR /&gt;CLOCK_DisableClock(kCLOCK_Swm);&lt;BR /&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;</description>
      <pubDate>Tue, 22 Jun 2021 06:55:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-with-getting-UART-to-work-SEMIHOSTING-REDLIB/m-p/1295892#M45576</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-06-22T06:55:07Z</dc:date>
    </item>
  </channel>
</rss>

