<?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中的主题 SPI communication FRDM-KL46Z</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/SPI-communication-FRDM-KL46Z/m-p/301779#M2252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HEllo ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a FRDM board to send SPI command to an external part with processor expert and&amp;nbsp; SM1: SPImaster_LDD component.&lt;/P&gt;&lt;P&gt;here below the component configuration :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SM1_SPImaster LDD.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43843i784B2B9916BEA0A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="SM1_SPImaster LDD.png" alt="SM1_SPImaster LDD.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To send a SPI write command I used the following functions&amp;nbsp; and it's working fine:( I 'm using a GPIO to drive the CS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;static&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; &lt;STRONG&gt;SpiWriteReg&lt;/STRONG&gt;(&lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; addr, &lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; val) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPI_CS_ENABLE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPIWriteByte(addr); &lt;SPAN style="color: #3f7f5f;"&gt;/* address */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPIWriteByte(val) ; &lt;SPAN style="color: #3f7f5f;"&gt;/* data */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPI_CS_DISABLE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;STRONG style=": ; color: #7f0055;"&gt;return&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ERR_OK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;static&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;STRONG style=": ; color: #7f0055;"&gt;void&lt;/STRONG&gt; &lt;STRONG&gt;SPIWriteByte&lt;/STRONG&gt;(&lt;STRONG style=": ; color: #7f0055;"&gt;unsigned&lt;/STRONG&gt; &lt;STRONG style=": ; color: #7f0055;"&gt;char&lt;/STRONG&gt; write) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;STRONG style=": ; color: #7f0055;"&gt;unsigned&lt;/STRONG&gt; &lt;STRONG style=": ; color: #7f0055;"&gt;char&lt;/STRONG&gt; dummy;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; (&lt;STRONG style=": ; color: #7f0055;"&gt;void&lt;/STRONG&gt;)SM1_ReceiveBlock(SM1_DeviceData, &amp;amp;dummy, &lt;STRONG style=": ; color: #7f0055;"&gt;sizeof&lt;/STRONG&gt;(dummy));&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; (&lt;STRONG style=": ; color: #7f0055;"&gt;void&lt;/STRONG&gt;)SM1_SendBlock(SM1_DeviceData, &amp;amp;write, &lt;STRONG style=": ; color: #7f0055;"&gt;sizeof&lt;/STRONG&gt;(write));&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;STRONG style=": ; color: #7f0055;"&gt;while&lt;/STRONG&gt;(!spi_DataReceivedFlag){}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;But I have a problem with such commands, because there is a delay between both SPIWriteByte(adrr) &amp;amp; SPIWriteByte(val).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;Could someone explain me how to send the same information without any delay as shown in the below picture:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI scope.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43951i0F68A00F94B4C452/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI scope.png" alt="SPI scope.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 14:02:52 GMT</pubDate>
    <dc:creator>r58737</dc:creator>
    <dc:date>2014-05-20T14:02:52Z</dc:date>
    <item>
      <title>SPI communication FRDM-KL46Z</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/SPI-communication-FRDM-KL46Z/m-p/301779#M2252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HEllo ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a FRDM board to send SPI command to an external part with processor expert and&amp;nbsp; SM1: SPImaster_LDD component.&lt;/P&gt;&lt;P&gt;here below the component configuration :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SM1_SPImaster LDD.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43843i784B2B9916BEA0A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="SM1_SPImaster LDD.png" alt="SM1_SPImaster LDD.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To send a SPI write command I used the following functions&amp;nbsp; and it's working fine:( I 'm using a GPIO to drive the CS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;static&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; &lt;STRONG&gt;SpiWriteReg&lt;/STRONG&gt;(&lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; addr, &lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; val) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPI_CS_ENABLE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPIWriteByte(addr); &lt;SPAN style="color: #3f7f5f;"&gt;/* address */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPIWriteByte(val) ; &lt;SPAN style="color: #3f7f5f;"&gt;/* data */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; SPI_CS_DISABLE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;STRONG style=": ; color: #7f0055;"&gt;return&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ERR_OK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;static&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;STRONG style=": ; color: #7f0055;"&gt;void&lt;/STRONG&gt; &lt;STRONG&gt;SPIWriteByte&lt;/STRONG&gt;(&lt;STRONG style=": ; color: #7f0055;"&gt;unsigned&lt;/STRONG&gt; &lt;STRONG style=": ; color: #7f0055;"&gt;char&lt;/STRONG&gt; write) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;STRONG style=": ; color: #7f0055;"&gt;unsigned&lt;/STRONG&gt; &lt;STRONG style=": ; color: #7f0055;"&gt;char&lt;/STRONG&gt; dummy;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; (&lt;STRONG style=": ; color: #7f0055;"&gt;void&lt;/STRONG&gt;)SM1_ReceiveBlock(SM1_DeviceData, &amp;amp;dummy, &lt;STRONG style=": ; color: #7f0055;"&gt;sizeof&lt;/STRONG&gt;(dummy));&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; (&lt;STRONG style=": ; color: #7f0055;"&gt;void&lt;/STRONG&gt;)SM1_SendBlock(SM1_DeviceData, &amp;amp;write, &lt;STRONG style=": ; color: #7f0055;"&gt;sizeof&lt;/STRONG&gt;(write));&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;STRONG style=": ; color: #7f0055;"&gt;while&lt;/STRONG&gt;(!spi_DataReceivedFlag){}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;But I have a problem with such commands, because there is a delay between both SPIWriteByte(adrr) &amp;amp; SPIWriteByte(val).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;Could someone explain me how to send the same information without any delay as shown in the below picture:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI scope.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43951i0F68A00F94B4C452/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI scope.png" alt="SPI scope.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:02:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/SPI-communication-FRDM-KL46Z/m-p/301779#M2252</guid>
      <dc:creator>r58737</dc:creator>
      <dc:date>2014-05-20T14:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: SPI communication FRDM-KL46Z</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/SPI-communication-FRDM-KL46Z/m-p/301780#M2253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Hi Philippe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;It seems that your code contains sending of address and data in two block (SendBlock method). To minimize the delay you must use SendBlock method and send address and data in one block (the SPIMaster_LDD code is optimized for this usage). You can use a structure where the addr and val are defined e.g.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;typedef&lt;/STRONG&gt; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;struct&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;uint8_t&lt;/SPAN&gt; &lt;SPAN style="font-family: Consolas; color: #0000c0; font-size: 10pt;"&gt;addr&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;uint8_t&lt;/SPAN&gt; &lt;SPAN style="font-family: Consolas; color: #0000c0; font-size: 10pt;"&gt;val&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;tData&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Then the code of your SpiWriteReg function can be following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;static&lt;/STRONG&gt;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;SpiWriteReg&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; addr, &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; val) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;&amp;nbsp; tData&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;&amp;nbsp; // data preparation for sending in one block of data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;&amp;nbsp; data.&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #0000c0; font-size: 10pt;"&gt;addr&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; = addr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; data.&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #0000c0; font-size: 10pt;"&gt;val&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; = val;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; // dummy variable for receiving of data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; dummy[2];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Consolas; color: #3f7f5f; font-size: 10pt;"&gt;SPI_CS_ENABLE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; // send and receive of address and value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;)SM1_ReceiveBlock(SM1_DeviceData, &amp;amp;dummy, &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;sizeof&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;tData&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;)SM1_SendBlock(SM1_DeviceData, &amp;amp;data, &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;sizeof&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #005032; font-size: 10pt;"&gt;tData&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; // wait for receiving of the block of data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;while&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;(!SM1_GetBlockReceivedStatus(SM1_DeviceData)){}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: Consolas; color: #3f7f5f; font-size: 10pt;"&gt;SPI_CS_DISABLE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;return&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; ERR_OK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Please, note that you can also use GetBlockReceiveStatus method of the SPIMaster_LDD component. You will find it when you switch to Advanced view mode in to the Component Inspector and enable generation of this method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;For more information about SPIMaster_LDD see the help of this component accessible using pop-up menu of the component in the components view(description of methods and Typical Usage).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="CS" style="font-family: 'Arial','sans-serif'; color: #1f497d; font-size: 10pt;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="CS" style="font-family: 'Arial','sans-serif'; color: #1f497d; font-size: 10pt;"&gt;Marek Neuzil&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 07:18:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/SPI-communication-FRDM-KL46Z/m-p/301780#M2253</guid>
      <dc:creator>marek_neuzil</dc:creator>
      <dc:date>2014-07-02T07:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: SPI communication FRDM-KL46Z</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/SPI-communication-FRDM-KL46Z/m-p/301781#M2254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello Marek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help. that is what I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 11:39:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/SPI-communication-FRDM-KL46Z/m-p/301781#M2254</guid>
      <dc:creator>r58737</dc:creator>
      <dc:date>2014-07-08T11:39:54Z</dc:date>
    </item>
  </channel>
</rss>

