<?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: SPI MOSI not moving as expected in S32 SDK</title>
    <link>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780688#M3524</link>
    <description>&lt;P&gt;&lt;A href="mailto:Hi@m_mishrikey" target="_blank"&gt;Hi@m_mishrikey&lt;/A&gt;&amp;nbsp;zh&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This looks more like the MOSI or MISO ports are not configured correctly, or check if the hardware of these two ports is affected.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Dec 2023 02:51:48 GMT</pubDate>
    <dc:creator>Senlent</dc:creator>
    <dc:date>2023-12-28T02:51:48Z</dc:date>
    <item>
      <title>SPI MOSI not moving as expected</title>
      <link>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780661#M3523</link>
      <description>&lt;P&gt;My S32K148 SPI2 peripheral was previously working but something seems to be misconfigured now.&lt;/P&gt;&lt;P&gt;I am communicating with an ADS8028 ADC chip.&lt;/P&gt;&lt;P&gt;When I try to send a write command, the MOSI line goes high and stays high, instead of sending data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int16_t get_MCC_ADC_tempC_x10(){
	uint16_t adc_tx_buf[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
	uint16_t adc_rx_buf[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
	uint32_t baudCalc;
	lpspi_state_t masterState;
 
	LPSPI_DRV_MasterInit(SPI2, &amp;amp;masterState, &amp;amp;SPI2_MasterConfigADCs);
	LPSPI_DRV_MasterConfigureBus(SPI2, &amp;amp;SPI2_MasterConfigADCs, &amp;amp;baudCalc);
 
	LPSPI_DRV_SetPcs(SPI2,LPSPI_PCS1,LPSPI_ACTIVE_LOW);
 
	adc3_temp_conv_complete = false;
	adc_tx_buf[0] = (adcconf | TSENSE_ON );	 // ADC3 temp sense, no averaging
	adc_tx_buf[1] = (adcconf | AIN0);
 
	LPSPI_DRV_MasterTransferBlocking(SPI2, (uint8_t *)&amp;amp;adc_tx_buf, (uint8_t *)&amp;amp;adc_rx_buf, 2*BUFFER_SIZE*2U, ADC_TIMEOUT);
 
 //	while(!adc3_temp_conv_complete){}  	//Flag set by ISR externally									 
 // Port A interrupt will set this true when conversion is completed.

        // Now read back temp data word:
	adc_tx_buf[0] = 0;
	LPSPI_DRV_MasterTransferBlocking(SPI2, (uint8_t *)&amp;amp;adc_tx_buf, (uint8_t *)&amp;amp;adc_rx_buf, 2*BUFFER_SIZE*1U, ADC_TIMEOUT);
	adc3_temp_conv_complete = false;

...
}
 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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="MOSI stuck high" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256086i77841A26F6EF31EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="tek00028.png" alt="MOSI stuck high" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MOSI stuck high&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You might think that the buffer is mistakenly filled with 0xFFFF, however I can confirm the value of (adcconf | T_SENSE) is 0x8020, and the value of (adcconf | AIN0) is 0xA000.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 01:44:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780661#M3523</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-12-28T01:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: SPI MOSI not moving as expected</title>
      <link>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780688#M3524</link>
      <description>&lt;P&gt;&lt;A href="mailto:Hi@m_mishrikey" target="_blank"&gt;Hi@m_mishrikey&lt;/A&gt;&amp;nbsp;zh&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This looks more like the MOSI or MISO ports are not configured correctly, or check if the hardware of these two ports is affected.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 02:51:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780688#M3524</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2023-12-28T02:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: SPI MOSI not moving as expected</title>
      <link>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780716#M3525</link>
      <description>&lt;P&gt;In terms of configuration, not sure what to check.&amp;nbsp; SPI2 is set to the correct pins, and I also believe the PEX settings are fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MicrosoftTeams-image (2).png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256093i4B74E773FEA1CFE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MicrosoftTeams-image (2).png" alt="MicrosoftTeams-image (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MicrosoftTeams-image (3).png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/256094iA67A083C322204CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MicrosoftTeams-image (3).png" alt="MicrosoftTeams-image (3).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 03:34:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780716#M3525</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-12-28T03:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPI MOSI not moving as expected</title>
      <link>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780734#M3526</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;I can't see any problem with the configuration. You can only test the SPI port on the MCU side, disconnect the MCU and Slave side, and test the output waveform.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 04:36:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1780734#M3526</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2023-12-28T04:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: SPI MOSI not moving as expected</title>
      <link>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1781034#M3529</link>
      <description>&lt;P&gt;I was making a measurement error, and also confusing input and output.&lt;/P&gt;&lt;P&gt;I wish the manual used MOSI/MISO instead of SOUT/SIN, somehow that always trips me up.&lt;/P&gt;&lt;P&gt;Anyway, thanks for the support!!!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 03:22:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/SPI-MOSI-not-moving-as-expected/m-p/1781034#M3529</guid>
      <dc:creator>m_mishrikey</dc:creator>
      <dc:date>2023-12-29T03:22:33Z</dc:date>
    </item>
  </channel>
</rss>

