<?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: PE Generate code SPI SM1_ReceiveBlock not work in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409457#M3285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you add the component "SPIMster_LDD" , you can refer to the &lt;EM&gt;Typical Usage .&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31720iCD35FC20FDC1A9AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; there have two demo , with interrupt and without , it show how to configure and use the SPI.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it still have not meet your demand, please tell me your chip .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&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, 18 Jun 2015 01:54:49 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2015-06-18T01:54:49Z</dc:date>
    <item>
      <title>PE Generate code SPI SM1_ReceiveBlock not work</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409456#M3284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When master SPI read data from slave SPI, the master will generate SPI CLK/PCS Low, the slave will clock data out from Sout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use SM1_ReceiveBlock() to read data from slave, there is no SPI CLK out from master, and it doesn't go the the PE_ISR(SM1_Interrupt).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I check SM1_SendBlock(), it works. There is "SPI_PDD_EnableDmasInterrupts(SPI0_BASE_PTR, SPI_PDD_TX_FIFO_FILL_INT_DMA);" .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In function "&lt;EM&gt;SM1_ReceiveBlock()&lt;/EM&gt;", should add "&lt;EM&gt;SPI_PDD_EnableDmasInterrupts(SPI0_BASE_PTR, SPI_PDD_RX_FIFO_DRAIN_INT_DMA);&lt;/EM&gt; " ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what is the proper way to generate SPI CLK during read data from slave?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 00:50:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409456#M3284</guid>
      <dc:creator>rabbitz</dc:creator>
      <dc:date>2015-06-18T00:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: PE Generate code SPI SM1_ReceiveBlock not work</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409457#M3285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you add the component "SPIMster_LDD" , you can refer to the &lt;EM&gt;Typical Usage .&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31720iCD35FC20FDC1A9AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; there have two demo , with interrupt and without , it show how to configure and use the SPI.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it still have not meet your demand, please tell me your chip .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&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, 18 Jun 2015 01:54:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409457#M3285</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-06-18T01:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: PE Generate code SPI SM1_ReceiveBlock not work</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409458#M3286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if you are using interrupt service or not, anyway please check the attached document in the typical usage section to see how the SPI_Master component is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically you need to write the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14345925667114081 jive_text_macro" data-renderedposition="134_8_1233_96" jivemacro_uid="_14345925667114081" modifiedtitle="true"&gt;&lt;P&gt;SM1_ReceiveBlock(MySPIPtr, InpData, BLOCK_SIZE); /* Request data block reception this is used to tell the driver how many bytes will be received and where they will be stored*/&lt;/P&gt;&lt;P&gt;SM1_SendBlock(MySPIPtr, OutData, BLOCK_SIZE); /*To provide clock for slave, master sends anything that is as long as &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;&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;&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;&amp;nbsp; expected answer from slave. length(msgDummy) = length(msgSlave) Outdata can be 0x00 or 0xFF commonly */&lt;/P&gt;&lt;P&gt; /* Master waits for data from slave */&lt;/P&gt;&lt;P&gt;&amp;nbsp; while (SM1_GetBlockReceivedStatus(masterDevData) == FALSE) ; &lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Hope this information can help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Adrian Sanchez Cano&lt;BR /&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, 18 Jun 2015 01:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409458#M3286</guid>
      <dc:creator>adriancano</dc:creator>
      <dc:date>2015-06-18T01:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: PE Generate code SPI SM1_ReceiveBlock not work</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409459#M3287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It still require to enable the SPI Rx interrupt,&lt;/P&gt;&lt;P&gt;Here is my code, it works now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;&lt;EM&gt; SPI_PDD_EnableDmasInterrupts(SPI0_BASE_PTR, SPI_PDD_RX_FIFO_DRAIN_INT_DMA); /* Enable RX interrupt */&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; SM1_ReceiveBlock(spiMasterDevData, &amp;amp;RxData[0], 2);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; SM1_SendBlock(spiMasterDevData, &amp;amp;CMDData[0], 2);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 02:15:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/PE-Generate-code-SPI-SM1-ReceiveBlock-not-work/m-p/409459#M3287</guid>
      <dc:creator>rabbitz</dc:creator>
      <dc:date>2015-06-18T02:15:52Z</dc:date>
    </item>
  </channel>
</rss>

