<?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: Kinetis SDK UART Driver (MQX) in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Kinetis-SDK-UART-Driver-MQX/m-p/703859#M7525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found the answer, the interrupt should be install by MQX function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Sep 2017 20:34:38 GMT</pubDate>
    <dc:creator>_ZZ_</dc:creator>
    <dc:date>2017-09-23T20:34:38Z</dc:date>
    <item>
      <title>Kinetis SDK UART Driver (MQX)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Kinetis-SDK-UART-Driver-MQX/m-p/703858#M7524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used to use this set of drivers (UART drivers) for my application and it was working fine. basically, it was working very nice off the shelf. &amp;nbsp;however, I have been running into trouble recently. the&amp;nbsp;UART_DRV_SendDataBlocking() &amp;nbsp;function after transmitting the data it wont return. I debug the the code and realised that the code will mess up where it calls the OSA_SemaPost(&amp;amp;uartState-&amp;gt;txIrqSync);&lt;/P&gt;&lt;P&gt;which is done inside the interrupt service routine. I am not sure how this semaphore posting is done behind sense but all I realised is that somewhere a long line the software goes into idle task and runs there for ever. &amp;nbsp;basically semaphorePost function never returns anything. &amp;nbsp;&lt;/P&gt;&lt;P&gt;the code is very simple as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------&lt;/P&gt;&lt;P&gt;uart_state_t uartStatee;&lt;/P&gt;&lt;P&gt;uart_user_config_t &amp;nbsp;uartConfigg = {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.bitCountPerChar = kUart8BitsPerChar,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .parityMode = kUartParityDisabled,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .stopBitCount = kUartOneStopBit,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .baudRate = 9600&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;UART_DRV_Init(4, &amp;amp;uartStatee, &amp;amp;uartConfigg); &amp;nbsp; // initialise the uart module&lt;BR /&gt;&amp;nbsp; &amp;nbsp; configure_uart_pins(UART4_IDX); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// initialise the pins for the uart module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;while(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UART_DRV_SendDataBlocking(4, "this is a string\r\n", strlen("this is a string\r\n"), 100);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// uart isr&amp;nbsp;&lt;/P&gt;&lt;P&gt;void UART4_RX_TX_IRQHandler(void) &amp;nbsp; &amp;nbsp;&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; UART_DRV_IRQHandler(4);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;the code is as simple as written above&lt;/P&gt;&lt;P&gt;Note1 : non-blocking function is still working fine. however, if I don't put any delay after calling the non-blocking function that will screw up everything. it prints off rubbish. it was not like this at all. &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Note 2 : my micro runs mqx os though. KSDK Mqx&lt;/P&gt;&lt;P&gt;Note 3: the semaphore seems to be working for other modules well. it is only happening with UART driver. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help! I am very thankful in advance&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2017 10:36:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Kinetis-SDK-UART-Driver-MQX/m-p/703858#M7524</guid>
      <dc:creator>_ZZ_</dc:creator>
      <dc:date>2017-09-14T10:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis SDK UART Driver (MQX)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Kinetis-SDK-UART-Driver-MQX/m-p/703859#M7525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found the answer, the interrupt should be install by MQX function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2017 20:34:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Kinetis-SDK-UART-Driver-MQX/m-p/703859#M7525</guid>
      <dc:creator>_ZZ_</dc:creator>
      <dc:date>2017-09-23T20:34:38Z</dc:date>
    </item>
  </channel>
</rss>

