<?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のトピックS32K146 LPSPI transfer bytes</title>
    <link>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1437884#M14737</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I try to transfer and receive 28-bytes data with s32k146.And I used the code as follow:&lt;/P&gt;&lt;P&gt;LPSPI_DRV_MasterTransfer(INST_LPSPI_2, masterDataSend, masterDataReceive, BUFFER_SIZE);&lt;BR /&gt;flag = ( LPSPI_DRV_MasterGetTransferStatus(INST_LPSPI_2, bytesRemained) == STATUS_SUCCESS);&lt;/P&gt;&lt;P&gt;masterDataSend is data which I want to send and masterDataReceive is which I want to receive,BUFFER_SIZE is set to 28u.&lt;/P&gt;&lt;P&gt;However, while flag is true the bytesRemained is 0,and Receive buff is all 1.&lt;/P&gt;&lt;P&gt;Is anything in my conde wrong?And how could I find problem.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 02 Apr 2022 02:46:31 GMT</pubDate>
    <dc:creator>lc12138</dc:creator>
    <dc:date>2022-04-02T02:46:31Z</dc:date>
    <item>
      <title>S32K146 LPSPI transfer bytes</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1437884#M14737</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I try to transfer and receive 28-bytes data with s32k146.And I used the code as follow:&lt;/P&gt;&lt;P&gt;LPSPI_DRV_MasterTransfer(INST_LPSPI_2, masterDataSend, masterDataReceive, BUFFER_SIZE);&lt;BR /&gt;flag = ( LPSPI_DRV_MasterGetTransferStatus(INST_LPSPI_2, bytesRemained) == STATUS_SUCCESS);&lt;/P&gt;&lt;P&gt;masterDataSend is data which I want to send and masterDataReceive is which I want to receive,BUFFER_SIZE is set to 28u.&lt;/P&gt;&lt;P&gt;However, while flag is true the bytesRemained is 0,and Receive buff is all 1.&lt;/P&gt;&lt;P&gt;Is anything in my conde wrong?And how could I find problem.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2022 02:46:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1437884#M14737</guid>
      <dc:creator>lc12138</dc:creator>
      <dc:date>2022-04-02T02:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 LPSPI transfer bytes</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1438210#M14751</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The source code in that .rar file is not readable.&lt;/P&gt;
&lt;P&gt;Can you attach it again?&lt;/P&gt;
&lt;P&gt;Regarding the code that you posted here,&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;flag = ( LPSPI_DRV_MasterGetTransferStatus(INST_LPSPI_2, bytesRemained) == STATUS_SUCCESS);&lt;/LI-CODE&gt;
&lt;P&gt;The function will not return STATUS_SUCCESS immediately. &lt;/P&gt;
&lt;P&gt;Can you use something like this intead?&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;LPSPI_DRV_MasterTransfer(INST_LPSPI_2, masterDataSend, masterDataReceive, BUFFER_SIZE);
while(LPSPI_DRV_MasterGetTransferStatus(INST_LPSPI_2, bytesRemained) != STATUS_SUCCESS);&lt;/LI-CODE&gt;
&lt;P&gt;If you want to receive all the data transmitted by the master, connect MOSI to MISO in a loop.&lt;/P&gt;
&lt;P&gt;Have you scoped the SPI bus with a logic analyzer?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Mon, 04 Apr 2022 08:12:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1438210#M14751</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-04-04T08:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 LPSPI transfer bytes</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1440072#M14816</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;I tried to use&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;while(LPSPI_DRV_MasterGetTransferStatus(INST_LPSPI_2, bytesRemained) != STATUS_SUCCESS);&lt;/PRE&gt;&lt;P&gt;but bytesRemained is still 0.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I sent a 9-bytes 0x55 to a LTC6820, and I used a&amp;nbsp;oscilloscope to scope the SPI bus in 6820 side&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MOSI(4bytes)" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/176113i6FBA022C80C14BA1/image-size/large?v=v2&amp;amp;px=999" role="button" title="MOSI_1.jpg" alt="MOSI(4bytes)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MOSI(4bytes)&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MISO(4bytes)" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/176114iDF72B9E569AE32D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="MISO_2.jpg" alt="MISO(4bytes)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MISO(4bytes)&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MISO(9bytes)" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/176116i9903A1BB79B1F66B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1649294436(1).png" alt="MISO(9bytes)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MISO(9bytes)&lt;/span&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you could see that MOSI signal is actually 0x55, but MISO signal is not good, although its also 9 bytes.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 01:25:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1440072#M14816</guid>
      <dc:creator>lc12138</dc:creator>
      <dc:date>2022-04-07T01:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 LPSPI transfer bytes</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1440319#M14829</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/197807"&gt;@lc12138&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you disconnect the LTC6820 and connect MOSI - MISO instead?&lt;/P&gt;
&lt;P&gt;Just to test the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 07:20:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-LPSPI-transfer-bytes/m-p/1440319#M14829</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-04-07T07:20:52Z</dc:date>
    </item>
  </channel>
</rss>

