<?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 How to communicate RS485 on FRDM KE04? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-communicate-RS485-on-FRDM-KE04/m-p/778898#M47383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am using&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 14px;"&gt;FRDM-KE04Z dev board with onboard MKE04Z8VFK4 MCU&lt;/STRONG&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;, I am trying to communicate serial UART0 using RS485 communication, While debugging mode it will work fine. Plz, help me on how to solve this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am&amp;nbsp;using UART0 PTB1(TX), PTB0(RX);&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;SDK_2.3.1_FRDM-KE04Z&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;following is my code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt; uart_config_t config;&lt;BR /&gt; uint8_t u8Ch = 0;&lt;/P&gt;&lt;P&gt;/* Define the init structure for the output LED pin*/&lt;BR /&gt; gpio_pin_config_t led_config = {&lt;BR /&gt; kGPIO_DigitalOutput, 0,&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;/* Init output LED GPIO. */&lt;BR /&gt; GPIO_PinInit(kGPIO_PORTA, 2U, &amp;amp;led_config); // configured GPIO PTA2 pin for rs485 communication&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; BOARD_InitPins();&lt;BR /&gt; BOARD_BootClockRUN();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; UART_GetDefaultConfig(&amp;amp;config);&lt;BR /&gt; config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE;&lt;BR /&gt; config.enableTx = true;&lt;BR /&gt; config.enableRx = true;&lt;/P&gt;&lt;P&gt;UART_Init(DEMO_UART, &amp;amp;config, DEMO_UART_CLK_FREQ);&lt;/P&gt;&lt;P&gt;/* echo chars received from terminal */&lt;BR /&gt; while(1)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; int i =0;&lt;BR /&gt;&amp;nbsp; GPIO_PinWrite(kGPIO_PORTA, 2U, 0u); // writing LOW for enable receiver mode&lt;BR /&gt;&amp;nbsp; u8Ch = UART_GetChar(UART0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; GPIO_PinWrite(kGPIO_PORTA, 2U, 1u); // writing High for transmit mode&lt;BR /&gt;&amp;nbsp; UART_PutChar(UART0, u8Ch);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Apr 2018 06:53:30 GMT</pubDate>
    <dc:creator>vikranthnk</dc:creator>
    <dc:date>2018-04-28T06:53:30Z</dc:date>
    <item>
      <title>How to communicate RS485 on FRDM KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-communicate-RS485-on-FRDM-KE04/m-p/778898#M47383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am using&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 14px;"&gt;FRDM-KE04Z dev board with onboard MKE04Z8VFK4 MCU&lt;/STRONG&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;, I am trying to communicate serial UART0 using RS485 communication, While debugging mode it will work fine. Plz, help me on how to solve this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am&amp;nbsp;using UART0 PTB1(TX), PTB0(RX);&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;SDK_2.3.1_FRDM-KE04Z&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;following is my code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt; uart_config_t config;&lt;BR /&gt; uint8_t u8Ch = 0;&lt;/P&gt;&lt;P&gt;/* Define the init structure for the output LED pin*/&lt;BR /&gt; gpio_pin_config_t led_config = {&lt;BR /&gt; kGPIO_DigitalOutput, 0,&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;/* Init output LED GPIO. */&lt;BR /&gt; GPIO_PinInit(kGPIO_PORTA, 2U, &amp;amp;led_config); // configured GPIO PTA2 pin for rs485 communication&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; BOARD_InitPins();&lt;BR /&gt; BOARD_BootClockRUN();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; UART_GetDefaultConfig(&amp;amp;config);&lt;BR /&gt; config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE;&lt;BR /&gt; config.enableTx = true;&lt;BR /&gt; config.enableRx = true;&lt;/P&gt;&lt;P&gt;UART_Init(DEMO_UART, &amp;amp;config, DEMO_UART_CLK_FREQ);&lt;/P&gt;&lt;P&gt;/* echo chars received from terminal */&lt;BR /&gt; while(1)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; int i =0;&lt;BR /&gt;&amp;nbsp; GPIO_PinWrite(kGPIO_PORTA, 2U, 0u); // writing LOW for enable receiver mode&lt;BR /&gt;&amp;nbsp; u8Ch = UART_GetChar(UART0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; GPIO_PinWrite(kGPIO_PORTA, 2U, 1u); // writing High for transmit mode&lt;BR /&gt;&amp;nbsp; UART_PutChar(UART0, u8Ch);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Apr 2018 06:53:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-communicate-RS485-on-FRDM-KE04/m-p/778898#M47383</guid>
      <dc:creator>vikranthnk</dc:creator>
      <dc:date>2018-04-28T06:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate RS485 on FRDM KE04?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-communicate-RS485-on-FRDM-KE04/m-p/778899#M47384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi customer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; What's the detail problem you are meeting now?&lt;/P&gt;&lt;P&gt;&amp;nbsp; As I know, after you establish your RS485 hardware, then you need to add the R/D pin control.&lt;/P&gt;&lt;P&gt;&amp;nbsp; When you want to send, you need to enable the send pin, when you want to receive the data, you need to enable the receive pin, actually, just add the GPIO control, the UART code you still can use the official code.&lt;/P&gt;&lt;P&gt;&amp;nbsp; In your code, I find you also add the GPIO control, so now, what's the detail problem you are meeting now? You need to test your GPIO control, make sure your GPIO can be pull low and high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 08:20:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-communicate-RS485-on-FRDM-KE04/m-p/778899#M47384</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-05-02T08:20:27Z</dc:date>
    </item>
  </channel>
</rss>

