<?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>Processor Expert SoftwareのトピックKL03: PE code generated for high level SDK LPUART component not working</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/KL03-PE-code-generated-for-high-level-SDK-LPUART-component-not/m-p/380519#M2941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am using PE to create a simple application for A KL03 controller which uses the UART. PE offers a high level LPUART component (the phone symbol) and it generates code which compiles without errors. However, When trying to transmit something the code appears to wait for ever to complete transmission. It looks like the ISR which handles this is never invoked. Besides a plain UART, PE also offers a debug console in the utilities category for this KL03 controller. When I try to simply use this high-level component the code gets stuck during component initialization attempting to call the standard library "setvbuf" function. Has anyone successfully used the high level SDK component or the debug console component for KL03? &lt;/P&gt;&lt;P&gt;TIA, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Nov 2014 17:55:17 GMT</pubDate>
    <dc:creator>rolandzitzke</dc:creator>
    <dc:date>2014-11-28T17:55:17Z</dc:date>
    <item>
      <title>KL03: PE code generated for high level SDK LPUART component not working</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL03-PE-code-generated-for-high-level-SDK-LPUART-component-not/m-p/380519#M2941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am using PE to create a simple application for A KL03 controller which uses the UART. PE offers a high level LPUART component (the phone symbol) and it generates code which compiles without errors. However, When trying to transmit something the code appears to wait for ever to complete transmission. It looks like the ISR which handles this is never invoked. Besides a plain UART, PE also offers a debug console in the utilities category for this KL03 controller. When I try to simply use this high-level component the code gets stuck during component initialization attempting to call the standard library "setvbuf" function. Has anyone successfully used the high level SDK component or the debug console component for KL03? &lt;/P&gt;&lt;P&gt;TIA, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 17:55:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL03-PE-code-generated-for-high-level-SDK-LPUART-component-not/m-p/380519#M2941</guid>
      <dc:creator>rolandzitzke</dc:creator>
      <dc:date>2014-11-28T17:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: KL03: PE code generated for high level SDK LPUART component not working</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL03-PE-code-generated-for-high-level-SDK-LPUART-component-not/m-p/380520#M2942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland,&lt;/P&gt;&lt;P&gt;I suppose you are using fsl_lpuart component from SDK. There is known issue - the LPUART device clock source&amp;nbsp; selection in SIM device is not done by the fsl_lpuart component (the default value is "clock source disabled"; see the after reset value of LPUART0SRC bits in SIM_SOPT2 register). This defect has been fixed in the upcoming SDK 1.1 release (it will be publushed soon).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the following workaround:&lt;/P&gt;&lt;P&gt;Disable autoinitialization in the Component Inspector of the fsl_uart component in the project:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="fsl_lpuart_settings_on_KL03.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47732iC5E7D0AE3BAFDFBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="fsl_lpuart_settings_on_KL03.png" alt="fsl_lpuart_settings_on_KL03.png" /&gt;&lt;/span&gt;&lt;BR /&gt;And use the following initialization code of the fsl_lpuart component in your application (it must be used after &lt;EM&gt;PE_low_level_init()&lt;/EM&gt; call in the &lt;EM&gt;main()&lt;/EM&gt; function). See example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;int main(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Write your local variable definition here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; const uint8_t test_data[10] = "123456789";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; uint32_t test_data_size = 9;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #99cc00; font-family: courier new,courier;"&gt;&lt;STRONG style="color: #339966;"&gt;&amp;nbsp; /* definition of LPUART state structure */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG style="color: #0000ff;"&gt;&amp;nbsp; lpuart_state_t fsl_lpuartCom1_state;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PE_low_level_init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /*** End of Processor Expert internal initialization.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Write your code here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt; &lt;SPAN style="color: #339966;"&gt; /* Selects the clock source for the LPUART0 transmit and receive clock.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #339966; font-family: courier new,courier;"&gt;&amp;nbsp; *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #339966; font-family: courier new,courier;"&gt;&amp;nbsp; * Values:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #339966; font-family: courier new,courier;"&gt;&amp;nbsp; * - 00 - Clock disabled&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #339966; font-family: courier new,courier;"&gt;&amp;nbsp; * - 01 - IRC48M clock&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #339966; font-family: courier new,courier;"&gt;&amp;nbsp; * - 10 - OSCERCLK clock&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #339966; font-family: courier new,courier;"&gt;&amp;nbsp; * - 11 - MCGIRCLK clock&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #339966; font-family: courier new,courier;"&gt;&amp;nbsp; */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; CLOCK_SYS_SetSource(kClockLpuart0Src, 0x3 /* LPUART0SRC&amp;nbsp; - MCGIRCLK = 0x3 */);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #339966;"&gt;/* fsl_lpuart component initialization; lpuartCom1_InitConfig0 structure is generated by the fsl_lpuart component */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; &lt;STRONG&gt;LPUART_DRV_Init(FSL_LPUARTCOM1,&amp;amp;fsl_lpuartCom1_state,&amp;amp;lpuartCom1_InitConfig0);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* send test data in a loop */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; for(;;) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPUART_DRV_SendData(FSL_LPUARTCOM1, test_data, test_data_size);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;. . .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The clock source is selected in the SIM device (LPUART0SRC bits in the SIM_SOPT2 register) and the baudrate is correctly initialized by the &lt;EM&gt;LPUART_DRV_Init()&lt;/EM&gt; method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Marek Neuzil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 10:36:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL03-PE-code-generated-for-high-level-SDK-LPUART-component-not/m-p/380520#M2942</guid>
      <dc:creator>marek_neuzil</dc:creator>
      <dc:date>2014-12-01T10:36:44Z</dc:date>
    </item>
  </channel>
</rss>

