<?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 32bits response and Clock Configuration</title>
    <link>https://community.nxp.com/t5/S32K/LPSPI-32bits-response-and-Clock-Configuration/m-p/1701021#M25859</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to communication with a sensor using the NXP S32K344 board as the master using LPSPI1. The clock for the spi communication should be 1MHz according to the sensor's datasheet. I need to send an 8bit command and should receive a 32bit response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I configured the clock for 10MHz and sent the command once and in the oscilloscope everything is fine despite not having answers from the sensor. Although when I put the clock at 1MHz the master sends 2 times the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clock at 10MHz:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rmpr_0-1691489123841.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235538iD642FA75D80185E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rmpr_0-1691489123841.png" alt="Rmpr_0-1691489123841.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Clock at 1MHz:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rmpr_1-1691489203803.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235539iB6B693A59D8734BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rmpr_1-1691489203803.png" alt="Rmpr_1-1691489203803.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the first problem. The baudrate used for both cases is 100000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also defined the SpiDataWidth for 32bits. But I'm not sure how to receive the 32 bits response since the RTD function used "Lpspi_Ip_SyncTransmit" has 8bits array as inputs.&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Lpspi_Ip_SyncTransmit(&amp;amp;SPI_EXTERNAL_DEVICE, Tx_Buffer, Rx_Buffer, NUMBER_OF_BYTES, TIMEOUT);&lt;/LI-CODE&gt;&lt;P&gt;Tx_Buffer is an uint8 and Rx_Buffer is an uint32.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Function Declaration:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Lpspi_Ip_StatusType Lpspi_Ip_SyncTransmit(
                                            const Lpspi_Ip_ExternalDeviceType *ExternalDevice,
                                            uint8 *TxBuffer,
                                            uint8 *RxBuffer,
                                            uint16 Length,
                                            uint32 TimeOut
                                         )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if I update "Lpspi_Ip_UpdateFrameSize" for 32 bits the programm crashes.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Lpspi_Ip_UpdateFrameSize(&amp;amp;SPI_EXTERNAL_DEVICE, 32U);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 10:13:35 GMT</pubDate>
    <dc:creator>Rmpr</dc:creator>
    <dc:date>2023-08-08T10:13:35Z</dc:date>
    <item>
      <title>LPSPI 32bits response and Clock Configuration</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-32bits-response-and-Clock-Configuration/m-p/1701021#M25859</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to communication with a sensor using the NXP S32K344 board as the master using LPSPI1. The clock for the spi communication should be 1MHz according to the sensor's datasheet. I need to send an 8bit command and should receive a 32bit response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I configured the clock for 10MHz and sent the command once and in the oscilloscope everything is fine despite not having answers from the sensor. Although when I put the clock at 1MHz the master sends 2 times the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clock at 10MHz:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rmpr_0-1691489123841.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235538iD642FA75D80185E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rmpr_0-1691489123841.png" alt="Rmpr_0-1691489123841.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Clock at 1MHz:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rmpr_1-1691489203803.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235539iB6B693A59D8734BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rmpr_1-1691489203803.png" alt="Rmpr_1-1691489203803.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the first problem. The baudrate used for both cases is 100000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also defined the SpiDataWidth for 32bits. But I'm not sure how to receive the 32 bits response since the RTD function used "Lpspi_Ip_SyncTransmit" has 8bits array as inputs.&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Lpspi_Ip_SyncTransmit(&amp;amp;SPI_EXTERNAL_DEVICE, Tx_Buffer, Rx_Buffer, NUMBER_OF_BYTES, TIMEOUT);&lt;/LI-CODE&gt;&lt;P&gt;Tx_Buffer is an uint8 and Rx_Buffer is an uint32.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Function Declaration:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Lpspi_Ip_StatusType Lpspi_Ip_SyncTransmit(
                                            const Lpspi_Ip_ExternalDeviceType *ExternalDevice,
                                            uint8 *TxBuffer,
                                            uint8 *RxBuffer,
                                            uint16 Length,
                                            uint32 TimeOut
                                         )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if I update "Lpspi_Ip_UpdateFrameSize" for 32 bits the programm crashes.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Lpspi_Ip_UpdateFrameSize(&amp;amp;SPI_EXTERNAL_DEVICE, 32U);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 10:13:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-32bits-response-and-Clock-Configuration/m-p/1701021#M25859</guid>
      <dc:creator>Rmpr</dc:creator>
      <dc:date>2023-08-08T10:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI 32bits response and Clock Configuration</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-32bits-response-and-Clock-Configuration/m-p/1702575#M25923</link>
      <description>&lt;P&gt;&lt;A href="mailto:Hi@Rmpr" target="_blank"&gt;Hi@Rmpr&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Sorry, we overloaded recently,&lt;BR /&gt;1. Regarding your first question, I didn't find any abnormality. This may be the reason of your sensor rather than MCU.&lt;BR /&gt;2. Rx_Buffer is an uint32, this is not correct, Rx_Buffer should be an 8-bit unsigned array. Secondly, the Frame size should have been set in the configuration interface.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 03:33:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-32bits-response-and-Clock-Configuration/m-p/1702575#M25923</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2023-08-10T03:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI 32bits response and Clock Configuration</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-32bits-response-and-Clock-Configuration/m-p/1702714#M25934</link>
      <description>Thank you, I managed to solve the problem &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;</description>
      <pubDate>Thu, 10 Aug 2023 07:10:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-32bits-response-and-Clock-Configuration/m-p/1702714#M25934</guid>
      <dc:creator>Rmpr</dc:creator>
      <dc:date>2023-08-10T07:10:40Z</dc:date>
    </item>
  </channel>
</rss>

