<?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>Kinetis Software Development Kitのトピックkl25z uart0 PE interrupt</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403752#M1602</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do a basic project with KL25Z freedom PE and KSDK. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have setup the lpsci component for uart0&amp;nbsp; and it seems to be running OK.&amp;nbsp; But, I also setup the "install interrupt" option in PE, but the interrupt is not firing when sending or receiving data.&amp;nbsp; Is there something else missing that I need to do?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KSDK 1.2&lt;/P&gt;&lt;P&gt;KDS 3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2015 18:45:13 GMT</pubDate>
    <dc:creator>mjg8t</dc:creator>
    <dc:date>2015-09-23T18:45:13Z</dc:date>
    <item>
      <title>kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403752#M1602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do a basic project with KL25Z freedom PE and KSDK. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have setup the lpsci component for uart0&amp;nbsp; and it seems to be running OK.&amp;nbsp; But, I also setup the "install interrupt" option in PE, but the interrupt is not firing when sending or receiving data.&amp;nbsp; Is there something else missing that I need to do?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KSDK 1.2&lt;/P&gt;&lt;P&gt;KDS 3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 18:45:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403752#M1602</guid>
      <dc:creator>mjg8t</dc:creator>
      <dc:date>2015-09-23T18:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403753#M1603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears that the NVIC is not setup by PE.&amp;nbsp; I am now trying to enable the NVIC manually as follows.&amp;nbsp; An interrupt is apprarenly auto triggered and there is an unhanlded event where the code jumper to DefaultISR.&amp;nbsp; Can someone tell me what I am doing wrong with the follow setup?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //uart0 is setup by pe before this point, still need to setup the NVIC.... &lt;/P&gt;&lt;P&gt;&amp;nbsp; LPSCI_HAL_DisableReceiver(UART0_IDX);&lt;/P&gt;&lt;P&gt;&amp;nbsp; LPSCI_HAL_DisableTransmitter(UART0_IDX);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //enable interrupts&lt;/P&gt;&lt;P&gt;&amp;nbsp; //NVIC_EnableIRQ(UART0_IRQn);&amp;nbsp; //setup nvic&lt;/P&gt;&lt;P&gt;&amp;nbsp; INT_SYS_EnableIRQ(UART0_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //void * INT_SYS_InstallHandler(IRQn_Type irqNumber, void (*handler)(void));&lt;/P&gt;&lt;P&gt;&amp;nbsp; INT_SYS_InstallHandler(UART0_IRQn, uart0_irq);&amp;nbsp; //void uart0_irq(void) function declared locally&lt;/P&gt;&lt;P&gt;&amp;nbsp; UART0_C2 |= UART0_C2_RIE_MASK;&amp;nbsp; //enalbe the rx ie bit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LPSCI_HAL_EnableReceiver(UART0_IDX);&lt;/P&gt;&lt;P&gt;&amp;nbsp; LPSCI_HAL_EnableTransmitter(UART0_IDX);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 23:03:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403753#M1603</guid>
      <dc:creator>mjg8t</dc:creator>
      <dc:date>2015-09-23T23:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403754#M1604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello M J:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interrupt is enabled in NVIC in the function &lt;STRONG&gt;LPSCI_DRV_Init()&lt;/STRONG&gt;, which is called automatically if Auto Initialization is selected from the component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I think your issue is an oversight of PE developers because Rx/Tx callbacks are enabled in the component by default, but that can cause issues if the callback is not implemented as explained in this thread: &lt;A href="https://community.nxp.com/message/540995"&gt;Configuring MKL25 LPSCI with fsl_lpsci Processor Expert bean&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that link you can find an example provided by colleague Li Kan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just in case I also recreated the example project from [C:\Freescale\KSDK_1.2.0\examples\frdmkl25z\driver_examples\lpsci\lpsci_non_blocking], but in a project with Processor Expert. You can find it attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps. Let me know if you have further issues.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&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>Thu, 24 Sep 2015 02:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403754#M1604</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-09-24T02:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403755#M1605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jorge.&amp;nbsp; It has been a challenge understanding the framework of SDK and how the basic implementations of things like the interrupts are setup within the SDK.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found you AN on using interrupts in the KSDK and KDS, which has been very valuable in understanding the important elements.&amp;nbsp; I hope you continue to create docs like this in the future!&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-104352"&gt;Interrupt handling with KSDK and Kinetis Design Studio&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 15:06:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403755#M1605</guid>
      <dc:creator>mjg8t</dc:creator>
      <dc:date>2015-09-25T15:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403756#M1606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Though it is still unclear to me what the difference is between the INT_SYS_EnableIRQ and INT_SYS_EnableIRQGlobal?&amp;nbsp; Can you explain why and when you use one vs the other?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 15:20:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403756#M1606</guid>
      <dc:creator>mjg8t</dc:creator>
      <dc:date>2015-09-25T15:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403757#M1607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to build your project, but I get a weird issue where the project says "Nothing to build for project KL25_UART_PE", even after running a "clean" and regenerating the PE code.&amp;nbsp; Oh well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked at the given example you linked here &lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-content-finding="Community" data-objectid="540995" data-objecttype="2" href="https://community.nxp.com/message/540995#540995" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #017bba;"&gt;Configuring MKL25 LPSCI with fsl_lpsci Processor Expert bean&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The project attached in the link does work with the lpsci does work with echoing data to the screen using the rx interrupt callback.&amp;nbsp; However when I comment out the main loop section of code there is seems to be hard fault and the "default isr" is called killing the program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// when this main loop code is commented out the program crashes!&lt;/P&gt;&lt;P&gt;if(kStatus_LPSCI_Success == LPSCI_DRV_ReceiveData(FSL_LPSCICOM1, &amp;amp;rx_data, 1u))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Wait until we receive a user character&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (kStatus_LPSCI_RxBusy == LPSCI_DRV_GetReceiveStatus(FSL_LPSCICOM1, NULL)) {}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Echo received character&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tx_data = rx_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPSCI_DRV_SendData(FSL_LPSCICOM1, &amp;amp;tx_data, 1u);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (kStatus_LPSCI_TxBusy == LPSCI_DRV_GetTransmitStatus(FSL_LPSCICOM1, NULL)) {}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea why the program would crash with the section commented out??&amp;nbsp; I did some experimentation, but could not figure out why.&amp;nbsp; It does seem to be a KSDK driver issue somehow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have re-attached the project here for reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 19:54:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403757#M1607</guid>
      <dc:creator>mjg8t</dc:creator>
      <dc:date>2015-09-25T19:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403758#M1608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello M J:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exactly what part are you commenting out? I took your project and commented that code. It worked from my side with no hardfaults, but obviously the project does nothing, just sitting in the &lt;STRONG&gt;for&lt;/STRONG&gt; loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your question above, &lt;STRONG&gt;INT_SYS_EnableIRQGlobal&lt;/STRONG&gt; enables the peripheral interrupts at the NVIC level in general, like a master switch, but &lt;STRONG&gt;INT_SYS_EnableIRQ&lt;/STRONG&gt; is also required to enable each individual interrupt you may need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Sep 2015 01:08:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403758#M1608</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-09-26T01:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403759#M1609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done some more experimenting and had hoped that the release of SDK 1.3 would have fixed this problem, but the problem persists with SDK 1.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem seems to be different from the link you mentioned where it was the way that the RX callback was being handled that was the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The first issue is that the Receive interrupt enable is not setup after the SDK has initialized the uart0 peripheral.&amp;nbsp; I have ensured the the RX callback is selected and the Install interrupt is selected in PE.&amp;nbsp; I have to manually enable the RIE bit in main for the interrupt to occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;added to main enable the the recieve interrupt enable:&lt;/P&gt;&lt;P&gt;UART0_C2 |= UART_C2_RIE_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The check for RX data is not working if((UART0_BRD_C2_RIE(base)) &amp;amp;&amp;amp; (UART0_BRD_S1_RDRF(base))).&amp;nbsp; I have to replace it with UART0_S1 &amp;amp;&amp;amp; UART_S1_RDRF_MASK in order for it to work.&lt;/P&gt;&lt;P&gt;((UART0_BRD_C2_RIE(base)) &amp;amp;&amp;amp; (UART0_BRD_S1_RDRF(base))) replaced with UART0_S1 &amp;amp;&amp;amp; UART_S1_RDRF_MASK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) The code crashes when the&amp;nbsp; LPSCI_DRV_IRQHandler is entered in the fsl_lpsci_driver.c sdk getChar function is called.&amp;nbsp; I have found the cause for the hard fault to be when the LPSCI_HAL_Getchar(base, lpsciState-&amp;gt;rxBuff); is called.&amp;nbsp; I have to directly read the uart0_d register and it works fine.&lt;/P&gt;&lt;P&gt;LPSCI_HAL_Getchar(base, lpsciState-&amp;gt;rxBuff);&amp;nbsp; replaced with the following:&lt;/P&gt;&lt;P&gt;lpsciState-&amp;gt;rxBuff = UART0_D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why I would need to make so many changes in order to get the SDK code to work?&amp;nbsp; Attached is my project with fixes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 15:31:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403759#M1609</guid>
      <dc:creator>mjg8t</dc:creator>
      <dc:date>2015-10-01T15:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403760#M1610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello M J:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;None of your changes should be required. The receive interrupt is not enabled until you call a receive API (&lt;STRONG&gt;UART_DRV_ReceiveData&lt;/STRONG&gt; or &lt;STRONG&gt;UART_DRV_ReceiveDataBlocking)&lt;/STRONG&gt;. In your project you are not calling any of both. Those functions require a pointer-to-buffer parameter in which you want to store the received data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 22:45:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403760#M1610</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-10-01T22:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: kl25z uart0 PE interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403761#M1611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jorge!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 14:59:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/kl25z-uart0-PE-interrupt/m-p/403761#M1611</guid>
      <dc:creator>mjg8t</dc:creator>
      <dc:date>2015-10-06T14:59:35Z</dc:date>
    </item>
  </channel>
</rss>

