<?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 shoot this touble? in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/How-to-shoot-this-touble/m-p/341039#M932</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I create a project in KDS, and it use MK10DX256VLH7. Now, I have a question to ask for your help.&lt;/P&gt;&lt;P&gt;I use PE to initial a SPI component, which involve Input interrupt and Output interrupt,and at the initial progress, PE auto enable SPI component also.Then, I define two variables, &lt;EM&gt;&lt;STRONG&gt;spi_tx_fin&lt;/STRONG&gt; &lt;/EM&gt;and &lt;EM&gt;&lt;STRONG&gt;spi_rx_fin&lt;/STRONG&gt;. &lt;/EM&gt;In the project, PE create two event functions, &lt;EM&gt;&lt;STRONG&gt;void SPI_OnBlockReceived(LDD_TUserData *UserDataPtr)&lt;/STRONG&gt; &lt;/EM&gt;and &lt;STRONG&gt;&lt;EM&gt;void SPI_OnBlockSent(LDD_TUserData *UserDataPtr). &lt;/EM&gt;&lt;/STRONG&gt;For the convenience of polling SPI transmit and/or receive progress success or not, I write the code: &lt;EM&gt;&lt;STRONG&gt;spi_tx&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt;_fin = Yes &lt;/EM&gt;&lt;/STRONG&gt;and&lt;EM&gt; &lt;EM&gt;&lt;STRONG&gt;spi_rx_fin&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt; = Yes&amp;nbsp; (Macro: Yes=1, No=0) &lt;/STRONG&gt;&lt;/EM&gt;in the two event functions respectively. Afterward, I define another function &lt;STRONG&gt;&lt;EM&gt;MotorInit()&lt;/EM&gt;&lt;/STRONG&gt;, which call function&amp;nbsp; &lt;STRONG&gt;&lt;EM&gt;LDD_TError SPI_SendBlock(LDD_TDeviceData *DeviceDataPtr, LDD_TData *BufferPtr, uint16_t Size) &lt;/EM&gt;&lt;/STRONG&gt;generated by PE to transmit data on the SPI module. The code as follows:&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&lt;EM&gt; spi_tx_fin = No;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; SPI_SendBlock(pSPI,if_configuration_429.buffer,4);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; while(spi_tx_fin == No);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, when debug program, the progress was blocked here &lt;STRONG&gt;&lt;EM&gt; while(spi_tx_fin == No);&lt;/EM&gt;&lt;/STRONG&gt; I checked the debug progress and was sure in the event function &lt;STRONG&gt;&lt;EM&gt;void SPI_OnBlockSent(LDD_TUserData *UserDataPtr) &lt;/EM&gt;&lt;/STRONG&gt;the variable &lt;STRONG&gt;&lt;EM&gt;spi_tx_fin&lt;/EM&gt;&lt;/STRONG&gt; was set &lt;EM&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, I offer my project to you. Thank you!&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-339112"&gt;workspace.kds.rar&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Nov 2014 11:43:04 GMT</pubDate>
    <dc:creator>guohuoping</dc:creator>
    <dc:date>2014-11-14T11:43:04Z</dc:date>
    <item>
      <title>How to shoot this touble?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/How-to-shoot-this-touble/m-p/341039#M932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I create a project in KDS, and it use MK10DX256VLH7. Now, I have a question to ask for your help.&lt;/P&gt;&lt;P&gt;I use PE to initial a SPI component, which involve Input interrupt and Output interrupt,and at the initial progress, PE auto enable SPI component also.Then, I define two variables, &lt;EM&gt;&lt;STRONG&gt;spi_tx_fin&lt;/STRONG&gt; &lt;/EM&gt;and &lt;EM&gt;&lt;STRONG&gt;spi_rx_fin&lt;/STRONG&gt;. &lt;/EM&gt;In the project, PE create two event functions, &lt;EM&gt;&lt;STRONG&gt;void SPI_OnBlockReceived(LDD_TUserData *UserDataPtr)&lt;/STRONG&gt; &lt;/EM&gt;and &lt;STRONG&gt;&lt;EM&gt;void SPI_OnBlockSent(LDD_TUserData *UserDataPtr). &lt;/EM&gt;&lt;/STRONG&gt;For the convenience of polling SPI transmit and/or receive progress success or not, I write the code: &lt;EM&gt;&lt;STRONG&gt;spi_tx&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt;_fin = Yes &lt;/EM&gt;&lt;/STRONG&gt;and&lt;EM&gt; &lt;EM&gt;&lt;STRONG&gt;spi_rx_fin&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt; = Yes&amp;nbsp; (Macro: Yes=1, No=0) &lt;/STRONG&gt;&lt;/EM&gt;in the two event functions respectively. Afterward, I define another function &lt;STRONG&gt;&lt;EM&gt;MotorInit()&lt;/EM&gt;&lt;/STRONG&gt;, which call function&amp;nbsp; &lt;STRONG&gt;&lt;EM&gt;LDD_TError SPI_SendBlock(LDD_TDeviceData *DeviceDataPtr, LDD_TData *BufferPtr, uint16_t Size) &lt;/EM&gt;&lt;/STRONG&gt;generated by PE to transmit data on the SPI module. The code as follows:&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&lt;EM&gt; spi_tx_fin = No;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; SPI_SendBlock(pSPI,if_configuration_429.buffer,4);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; while(spi_tx_fin == No);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, when debug program, the progress was blocked here &lt;STRONG&gt;&lt;EM&gt; while(spi_tx_fin == No);&lt;/EM&gt;&lt;/STRONG&gt; I checked the debug progress and was sure in the event function &lt;STRONG&gt;&lt;EM&gt;void SPI_OnBlockSent(LDD_TUserData *UserDataPtr) &lt;/EM&gt;&lt;/STRONG&gt;the variable &lt;STRONG&gt;&lt;EM&gt;spi_tx_fin&lt;/EM&gt;&lt;/STRONG&gt; was set &lt;EM&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, I offer my project to you. Thank you!&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-339112"&gt;workspace.kds.rar&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 11:43:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/How-to-shoot-this-touble/m-p/341039#M932</guid>
      <dc:creator>guohuoping</dc:creator>
      <dc:date>2014-11-14T11:43:04Z</dc:date>
    </item>
  </channel>
</rss>

