<?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>S32KのトピックLPSPI Send and receive data greater than 32bit</title>
    <link>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1156158#M8221</link>
    <description>&lt;P&gt;&amp;nbsp;I run into the problem of sending 10 Bytes of data, but TDR size is 32Bit. I tried several possibilities, as found in the NXP community:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// for loop: //for ( index = 0; index &amp;lt; sequence_length; ++index) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// for loop: //LPSPI1-&amp;gt;TDR = &amp;amp;txbuffer[index]; /* Transmit data */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// for loop: //}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// cast to 32Bit words&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// LPSPI1-&amp;gt;TDR = ((uint32_t)txbuffer[index] &amp;lt;&amp;lt; 24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+1] &amp;lt;&amp;lt; 16)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+2] &amp;lt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;/* Transmit data */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+3] ) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// LPSPI1-&amp;gt;TDR = ((uint32_t)txbuffer[index+4] &amp;lt;&amp;lt; 24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+5] &amp;lt;&amp;lt; 16)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+6] &amp;lt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;/* Transmit data */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+7] ) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// LPSPI1-&amp;gt;TDR = ((uint32_t)txbuffer[index+8] &amp;lt;&amp;lt; 24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+9] &amp;lt;&amp;lt; 16);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Nothing is working, also receiving more than 32 Bits is not working!&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;How should the sending and receiving of data greater than 32Bit word file be implemented?&lt;/P&gt;&lt;P&gt;and How should the framesize be adjusted? (I changed it to 80bits)&lt;/P&gt;</description>
    <pubDate>Mon, 21 Sep 2020 09:02:14 GMT</pubDate>
    <dc:creator>maurice_mueller</dc:creator>
    <dc:date>2020-09-21T09:02:14Z</dc:date>
    <item>
      <title>LPSPI Send and receive data greater than 32bit</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1156158#M8221</link>
      <description>&lt;P&gt;&amp;nbsp;I run into the problem of sending 10 Bytes of data, but TDR size is 32Bit. I tried several possibilities, as found in the NXP community:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// for loop: //for ( index = 0; index &amp;lt; sequence_length; ++index) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// for loop: //LPSPI1-&amp;gt;TDR = &amp;amp;txbuffer[index]; /* Transmit data */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// for loop: //}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// cast to 32Bit words&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// LPSPI1-&amp;gt;TDR = ((uint32_t)txbuffer[index] &amp;lt;&amp;lt; 24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+1] &amp;lt;&amp;lt; 16)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+2] &amp;lt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;/* Transmit data */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+3] ) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// LPSPI1-&amp;gt;TDR = ((uint32_t)txbuffer[index+4] &amp;lt;&amp;lt; 24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+5] &amp;lt;&amp;lt; 16)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+6] &amp;lt;&amp;lt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;/* Transmit data */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+7] ) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// LPSPI1-&amp;gt;TDR = ((uint32_t)txbuffer[index+8] &amp;lt;&amp;lt; 24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// |((uint32_t)txbuffer[index+9] &amp;lt;&amp;lt; 16);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Nothing is working, also receiving more than 32 Bits is not working!&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;How should the sending and receiving of data greater than 32Bit word file be implemented?&lt;/P&gt;&lt;P&gt;and How should the framesize be adjusted? (I changed it to 80bits)&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 09:02:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1156158#M8221</guid>
      <dc:creator>maurice_mueller</dc:creator>
      <dc:date>2020-09-21T09:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI Send and receive data greater than 32bit</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1156920#M8239</link>
      <description>&lt;P&gt;Hello Maurice,&lt;/P&gt;
&lt;P&gt;Could you please elaborate on what exactly does not work?&lt;/P&gt;
&lt;P&gt;Can you scope the bus and share it?&lt;/P&gt;
&lt;P&gt;I modified the S32K144_Project_LPSPI example from the S32DS IDE to send 80b frames.&lt;/P&gt;
&lt;P&gt;Because it does not read the RX data, CFGR1_NOSTALL = 1.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1600778817869.png" style="width: 510px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/125842iC88FE6EA51C350B4/image-dimensions/510x197?v=v2" width="510" height="197" role="button" title="danielmartynek_0-1600778817869.png" alt="danielmartynek_0-1600778817869.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 12:48:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1156920#M8239</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-09-22T12:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI Send and receive data greater than 32bit</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1158870#M8276</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;thank you for the example.&lt;/P&gt;&lt;P&gt;But my problem actual is the change of the framsize during runtime. I have SPI messages that are 3 Bytes long. And then I have to write 10 Bytes and read 10 Bytes. My problem is, that when I watch the framsesize in TCR register, it will only change from 23 bit to 79 bit when I step through. In running mode (without breakpoints) the Framsesize changes somehow to 0x05F...but this value is never been written to the TCR.&lt;/P&gt;&lt;P&gt;Do you have an example where the framesize is changed ? Attached I have&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Framesize is 0x05F" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/126133i8148FAC276FACEBA/image-size/large?v=v2&amp;amp;px=999" role="button" title="TCR-framesize.png" alt="Framesize is 0x05F" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Framesize is 0x05F&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spi send  80bit (but it is more)" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/126135i3A9968BF360B96B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI_1.png" alt="spi send  80bit (but it is more)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;spi send  80bit (but it is more)&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spi send 24 bit" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/126136iD3A3AF7CDD6E5824/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI_24bit frame.png" alt="spi send 24 bit" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;spi send 24 bit&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 19:57:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1158870#M8276</guid>
      <dc:creator>maurice_mueller</dc:creator>
      <dc:date>2020-09-24T19:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI Send and receive data greater than 32bit</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1160628#M8330</link>
      <description>&lt;P&gt;Hi Maurice.&lt;/P&gt;
&lt;P&gt;You probably mask the register (read-modify-write operation)&lt;/P&gt;
&lt;P&gt;TCR |= new_command;&lt;/P&gt;
&lt;P&gt;because&lt;/P&gt;
&lt;P&gt;23 = 0x17&lt;/P&gt;
&lt;P&gt;79 = 0x4F&lt;/P&gt;
&lt;P&gt;0x17 | 0x4F = 0x5F.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please write the PCR register with a 32b word directly.&lt;/P&gt;
&lt;P&gt;TCR = command_framesize_80b;&lt;/P&gt;
&lt;P&gt;TCR = command_framesize_24b;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:11:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-Send-and-receive-data-greater-than-32bit/m-p/1160628#M8330</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-09-29T11:11:35Z</dc:date>
    </item>
  </channel>
</rss>

