<?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>S32 SDKのトピックRe: LPSPI_DRV_MasterTransferBlocking misbehavior</title>
    <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578949#M2873</link>
    <description>&lt;P&gt;Delay didn't help. I also tried changing the timeout to something much longer, and even OSIF_WAIT_FOREVER. No luck.&lt;/P&gt;&lt;P&gt;Something really bizarre.&amp;nbsp; Is the clock line termination an indication of a problem on the SPI Master (S32K148)?&amp;nbsp; Or could the slave be misbehaving?&amp;nbsp; According to the slave datasheet the clock is an input only with 50k pull-down.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tomorrow I will try to start a blank project from scratch.&amp;nbsp; Maybe I can narrow it down to being a hardware or software issue.&lt;/P&gt;&lt;P&gt;Thanks for your suggestions.&amp;nbsp; Will let you know if I find anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2023 04:03:14 GMT</pubDate>
    <dc:creator>m_mishrikey</dc:creator>
    <dc:date>2023-01-09T04:03:14Z</dc:date>
    <item>
      <title>LPSPI_DRV_MasterTransferBlocking misbehavior</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578862#M2869</link>
      <description>&lt;P&gt;I had LPSPI working fantastically, then I went and refactored my code.&amp;nbsp; It&amp;nbsp; is now broken, and I am unable to figure out what happened.&lt;/P&gt;&lt;P&gt;The code is pretty simple.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="m_mishrikey_3-1673209319920.png" style="width: 957px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206388i46D472864A360D76/image-dimensions/957x321?v=v2" width="957" height="321" role="button" title="m_mishrikey_3-1673209319920.png" alt="m_mishrikey_3-1673209319920.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Some clues -&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) If I try to send one byte, it sends 7, then clock is stuck high and PCS0 is stuck low:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="m_mishrikey_0-1673209163288.png" style="width: 699px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206385iD823DBE4522B3FE1/image-dimensions/699x524?v=v2" width="699" height="524" role="button" title="m_mishrikey_0-1673209163288.png" alt="m_mishrikey_0-1673209163288.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2) If I try to send three bytes, it only sends one.&amp;nbsp; Clock again stuck high and PCS0 is stuck low:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="m_mishrikey_1-1673209258911.png" style="width: 719px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206386iD682B4EBE08D718F/image-dimensions/719x539?v=v2" width="719" height="539" role="button" title="m_mishrikey_1-1673209258911.png" alt="m_mishrikey_1-1673209258911.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did manage to get a screenshot when it did work:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="m_mishrikey_2-1673209301841.png" style="width: 703px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206387iCAC0E0682DDBEC0F/image-dimensions/703x527?v=v2" width="703" height="527" role="button" title="m_mishrikey_2-1673209301841.png" alt="m_mishrikey_2-1673209301841.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Grateful for any troubleshooting ideas!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2023 20:28:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578862#M2869</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-01-08T20:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI_DRV_MasterTransferBlocking misbehavior</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578908#M2870</link>
      <description>&lt;P&gt;&lt;A href="mailto:Hi@m_mishrikey" target="_blank"&gt;Hi@m_mishrikey&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;regarding the &lt;STRONG&gt;&lt;EM&gt;transferByteCount&lt;/EM&gt; &lt;/STRONG&gt;settings,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1673229925390.png" style="width: 752px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206403i73A90709A4614144/image-dimensions/752x265?v=v2" width="752" height="265" role="button" title="Senlent_0-1673229925390.png" alt="Senlent_0-1673229925390.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This may be caused by the transferByteCount setting,&lt;/P&gt;
&lt;P&gt;Usually Bits/frame is fixed, you can try to set transferByteCount to 3, if you want to send one byte,please try fill the remaining two bytes with 0 and test it again.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 02:15:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578908#M2870</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2023-01-09T02:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI_DRV_MasterTransferBlocking misbehavior</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578926#M2871</link>
      <description>&lt;P&gt;I changed it to this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;uint8_t tx_buf[3];
uint8_t masterDataReceive[3];

lpspi_state_t masterStateSPI0;
LPSPI_DRV_MasterInit(SPI0, &amp;amp;masterStateSPI0, &amp;amp;SPI0_MasterConfig1553);
LPSPI_DRV_SetPcs(SPI0,LPSPI_PCS0,LPSPI_ACTIVE_LOW);

holt_6135_reset();

tx_buf[0] = enMAP1;  tx_buf[1] = 0x00; tx_buf[2] = 0x00;// send D8
LPSPI_DRV_MasterTransferBlocking(SPI0, (uint8_t *)&amp;amp;tx_buf, (uint8_t *)&amp;amp;masterDataReceive, 3, SPI0_TIMEOUT);

tx_buf[0] = FASTREAD(10); tx_buf[1] = 0x00; tx_buf[2] = 0x00;		// Read register 0x000A (10)  =  send 28
LPSPI_DRV_MasterTransferBlocking(SPI0, (uint8_t *)&amp;amp;tx_buf, (uint8_t *)&amp;amp;masterDataReceive, 3, SPI0_TIMEOUT);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and when it sends the first message it does only send the first byte.&amp;nbsp; It's not followed by the nonsense bytes, but it's also not followed by two zero bytes despite the 3 in the transferbytecount.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="m_mishrikey_0-1673232483462.png" style="width: 819px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206409i90CDB98514FA825E/image-dimensions/819x614?v=v2" width="819" height="614" role="button" title="m_mishrikey_0-1673232483462.png" alt="m_mishrikey_0-1673232483462.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Very confused.&amp;nbsp; When I had it working, on the first message I was able to send a one byte frame followed by three byte frames:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="m_mishrikey_1-1673232566517.png" style="width: 803px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206410i75CC3D3B8152A94D/image-dimensions/803x602?v=v2" width="803" height="602" role="button" title="m_mishrikey_1-1673232566517.png" alt="m_mishrikey_1-1673232566517.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 02:50:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578926#M2871</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-01-09T02:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI_DRV_MasterTransferBlocking misbehavior</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578941#M2872</link>
      <description>&lt;P&gt;&lt;A href="mailto:Hi@m_mishrikey" target="_blank"&gt;Hi@m_mishrikey&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The clock line of the first picture is terminated for some reason,and I don't see any problem with the code.&lt;/P&gt;
&lt;P&gt;Maybe add some delay before sending, and try to increase the timeout value of sending.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 03:38:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578941#M2872</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2023-01-09T03:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI_DRV_MasterTransferBlocking misbehavior</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578949#M2873</link>
      <description>&lt;P&gt;Delay didn't help. I also tried changing the timeout to something much longer, and even OSIF_WAIT_FOREVER. No luck.&lt;/P&gt;&lt;P&gt;Something really bizarre.&amp;nbsp; Is the clock line termination an indication of a problem on the SPI Master (S32K148)?&amp;nbsp; Or could the slave be misbehaving?&amp;nbsp; According to the slave datasheet the clock is an input only with 50k pull-down.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tomorrow I will try to start a blank project from scratch.&amp;nbsp; Maybe I can narrow it down to being a hardware or software issue.&lt;/P&gt;&lt;P&gt;Thanks for your suggestions.&amp;nbsp; Will let you know if I find anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 04:03:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1578949#M2873</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-01-09T04:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI_DRV_MasterTransferBlocking misbehavior</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1582830#M2883</link>
      <description>&lt;P&gt;I was able to fix this problem by starting a new project from scratch.&amp;nbsp; I never figured out the root cause.&amp;nbsp; I diff'd the source code and the generated code, but did not see what the difference was.&lt;/P&gt;&lt;P&gt;I'm not sure if it's possible, but maybe there was something corrupted in the compiled output?&amp;nbsp; Oh well.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 03:04:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1582830#M2883</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-01-16T03:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI_DRV_MasterTransferBlocking misbehavior</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1582833#M2884</link>
      <description>&lt;P&gt;Regarding transferByteCount, I am able to successfully change the byte count from message to message.&amp;nbsp; So for example in the screenshot I sent, the first message is a single byte, D8, and subsequent ones are triplets.&amp;nbsp; This seems to work very well.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 03:08:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPSPI-DRV-MasterTransferBlocking-misbehavior/m-p/1582833#M2884</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-01-16T03:08:33Z</dc:date>
    </item>
  </channel>
</rss>

