<?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: Uart termios settings in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571458#M5819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As it has been quite a while, I do not remember what was the fix. But you can verify whether it is termios mismatch by trying to open the port with some serial tools eg: gtkterm etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jul 2020 12:09:40 GMT</pubDate>
    <dc:creator>tonymakkiel</dc:creator>
    <dc:date>2020-07-27T12:09:40Z</dc:date>
    <item>
      <title>Uart termios settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571452#M5813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am running the uart dma_transfer example within KDS 2 on TWR-KL43Z. The example works fine when I use gtkterminal. I tried to emulate the same by sending a character 'A' 20 times. But, the twr does not seem to receive the data.&lt;/P&gt;&lt;P&gt;Can somebody please confirm whether the following termios settings is sufficient?&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;ret = cfsetispeed(&amp;amp;uart_termios, B115200);&amp;nbsp; /* Disable parity and set 1 stop bit */ uart_termios.c_cflag &amp;amp;= ~( PARENB | CSTOPB); uart_termios.c_cflag |= (CS8 | CREAD | CLOCAL);&amp;nbsp; /* Disable Input/Output flow ctrl,*/ uart_termios.c_iflag &amp;amp;= ~(IXON | IXOFF | INPCK | CRTSCTS); uart_termios.c_iflag |= ( IGNPAR | IXANY );&lt;/PRE&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also attached the code I try to emulate uart on the host linux side.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gcc test.c -l pthread -o test&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339033" rel="nofollow noopener noreferrer" target="_blank"&gt;test.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 16:22:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571452#M5813</guid>
      <dc:creator>tonymakkiel</dc:creator>
      <dc:date>2016-08-04T16:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Uart termios settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571453#M5814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Tony, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your application, I suppose that you use PC to communicate with TWR-KL43Z via RS232 instead of using USB port which is treated as virtual com, is it correct?&lt;/P&gt;&lt;P&gt;If you use RS232 port, as you know that the TWR-Kl43 does not has RS232 port, in the case, you have to establish a tower system with TWR-KL43Z, TWR-SER which has RS232 port and Primary/Secondary elevator board, you can connect the RS232 port of PC to RS232 port on TWR-SER board. Furthermore, you have to set the jumper correctly and power supply correctly, on the TWR-KL43Z, you have to close pin1&amp;amp;2 for J5, close pin1&amp;amp;2 for J3, while you have use UART2 module(PTE23 and PTE22) for KL43Z. For the TWR-SER board, you have to close pin1&amp;amp;2&amp;nbsp; for J17 and J19.&lt;/P&gt;&lt;P&gt;Regarding your code run in PC with Linux OS, it sounds good that you create a thread which monitors the RS232 port, while you press Ctrl+C, signal_hdlr() is run, which close all the thread and current progress. But I am not very familiar with Linux and struct termios, do you means that your code can run the virtual USB Com instead of RS232? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is not your scenario, I am&amp;nbsp; sorry, pls tell me the hardware connection.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 05:49:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571453#M5814</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-08-05T05:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Uart termios settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571454#M5815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Xiangjun Rong,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I don't think set up is the problem (Note, both Tx&amp;nbsp; and Rx works if I use gtkterm). I am using TWR-SER board (PC connected to the RS232 port of the TWR-SER).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The problem is when I run the attached code, Tx does not happen (infact KL43Z does not even call the DMA interrupt.).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The SDK example code within the SDK echoes back what ever it received. My test code can receive data. But KL43 does not seem to receive data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Many Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Tony&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 09:37:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571454#M5815</guid>
      <dc:creator>tonymakkiel</dc:creator>
      <dc:date>2016-08-05T09:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Uart termios settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571455#M5816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works on Windows. So it should be one of the termios settings!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 13:08:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571455#M5816</guid>
      <dc:creator>tonymakkiel</dc:creator>
      <dc:date>2016-08-05T13:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Uart termios settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571456#M5817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fixed on Linux as well. There was some stray settings which got read from the system. Once the uart control bits were overwritten, it started working.&lt;/P&gt;&lt;P&gt;Thank you for your help &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Xiangjun Rong.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:17:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571456#M5817</guid>
      <dc:creator>tonymakkiel</dc:creator>
      <dc:date>2016-08-05T15:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Uart termios settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571457#M5818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please explain how you got it working as I'm stuck with the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2020 11:51:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571457#M5818</guid>
      <dc:creator>sujay1</dc:creator>
      <dc:date>2020-07-27T11:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Uart termios settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571458#M5819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As it has been quite a while, I do not remember what was the fix. But you can verify whether it is termios mismatch by trying to open the port with some serial tools eg: gtkterm etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2020 12:09:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Uart-termios-settings/m-p/571458#M5819</guid>
      <dc:creator>tonymakkiel</dc:creator>
      <dc:date>2020-07-27T12:09:40Z</dc:date>
    </item>
  </channel>
</rss>

