<?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: S32K3 SPI Transmit Data is Interrupted in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1595973#M20524</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/117564"&gt;@YL005&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the information you gave us, it seems that CAN may be interrupting the data transmission of SPI. To verify this, could you share your code with us so we can check it in detail?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B.R.&lt;/P&gt;
&lt;P&gt;VaneB&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 20:51:54 GMT</pubDate>
    <dc:creator>VaneB</dc:creator>
    <dc:date>2023-02-08T20:51:54Z</dc:date>
    <item>
      <title>S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1594569#M20480</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm developing SPI functions with S32K3 evaluation board and&amp;nbsp;trying to send 9 commands in a row with 15 bytes per command without DMA involved. The MCAL used in this project is "SW32K3_RTD_4.4_2.0.2"&lt;/P&gt;&lt;P&gt;The SPI is working properly without receive CAN messages. But when the controller starts to receive CAN messages, the transmited SPI data seems to be interrupted frequently. (The interrupt priority of CAN is 5 and the SPI is 3.)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone tell me why this happened and how to identify which function the SPI is interrupted by.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normal SPI Command&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NormalSpiTransmit.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/209917i66533D32CD768413/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NormalSpiTransmit.png" alt="NormalSpiTransmit.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Interrupted SPI command&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="InterruptedSpiTransmit.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/209918i532877468EEAAC6A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="InterruptedSpiTransmit.png" alt="InterruptedSpiTransmit.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 09:26:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1594569#M20480</guid>
      <dc:creator>YL005</dc:creator>
      <dc:date>2023-02-07T09:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1595973#M20524</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/117564"&gt;@YL005&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the information you gave us, it seems that CAN may be interrupting the data transmission of SPI. To verify this, could you share your code with us so we can check it in detail?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B.R.&lt;/P&gt;
&lt;P&gt;VaneB&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 20:51:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1595973#M20524</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-08T20:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1599421#M20689</link>
      <description>&lt;P&gt;Hi VaneB,&lt;/P&gt;&lt;P&gt;Sorry for the late reply. Sorry, I can't provide the code I used, because there is some information related to our project. But I can share the interrupt configuration with the priority of the CAN and SPI as the attached files. The CAN messages are received by CAN0 and SPI is transmitted by SPI5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 08:30:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1599421#M20689</guid>
      <dc:creator>YL005</dc:creator>
      <dc:date>2023-02-15T08:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1599741#M20701</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/117564"&gt;@YL005&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you elaborate more on how you are managing the SPI IRQ? Are you receiving/sending the SPI frame on the IRQ Handler or outside?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 17:10:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1599741#M20701</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-15T17:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1612281#M21252</link>
      <description>&lt;P&gt;Sorry for lately reply.&lt;/P&gt;&lt;P&gt;I use the following API to initial the SPI driver.&lt;/P&gt;&lt;P&gt;/* Initialize the Spi driver */&lt;BR /&gt;Spi_Init(NULL_PTR);&lt;BR /&gt;/* Set Spi mode */&lt;BR /&gt;Spi_SetAsyncMode(SPI_INTERRUPT_MODE);&lt;/P&gt;&lt;P&gt;Then use the following API to send and receive SPI command.&lt;/P&gt;&lt;P&gt;Spi_SetupEB(SpiConf_SpiChannel_SpiChannel_HostSPI, TxChBuf, receiveData, 15u);&lt;BR /&gt;statusHost = Spi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_Host);&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 08:35:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1612281#M21252</guid>
      <dc:creator>YL005</dc:creator>
      <dc:date>2023-03-09T08:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1613359#M21290</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/117564"&gt;@YL005&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the information you provided me, I can see that you are using synchronous and asynchronous communication functions. Are you using both types of communication?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 21:37:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1613359#M21290</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-03-10T21:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1618840#M21510</link>
      <description>&lt;P&gt;No, the transmit API I used in runtime is synchronize only&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;statusHost = Spi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_Host);&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 04:08:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1618840#M21510</guid>
      <dc:creator>YL005</dc:creator>
      <dc:date>2023-03-21T04:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1618867#M21511</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I found out that another interrupt is also weird&lt;/P&gt;&lt;P&gt;The PIT notification should be called every 1ms, and I flip a 1ms flag in the callback function as follow&lt;/P&gt;&lt;P&gt;void Gpt_PitNotification_PIT0_CH0(void) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fs_f_us1msFastTask ^= 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;The flag record by lauterbach as the figure attached.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YL005_0-1679390502839.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215574i2CC4F686667F8059/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YL005_0-1679390502839.png" alt="YL005_0-1679390502839.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my point of view, I would say that there's someone has higher priority of the PIT or SPI.&lt;/P&gt;&lt;P&gt;Attached is the configuration of interrupts, I can't find any clue about it.&lt;/P&gt;&lt;P&gt;Please tell my if you have any further ideas.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 09:22:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1618867#M21511</guid>
      <dc:creator>YL005</dc:creator>
      <dc:date>2023-03-21T09:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1619434#M21522</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/117564"&gt;@YL005&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the document, you shared only the interrupts of PIT0, FlexCan 1 to 5, LPSPI0 and LPSPI5.&lt;/P&gt;
&lt;P&gt;One possibility is that PIT0, the one with the highest priority, should not be interrupted by another, but it could interrupt FlexCan and LPSPI.&lt;/P&gt;
&lt;P&gt;Also, having so many interruptions, you must manage these well so they do not overlap.&lt;BR /&gt;What I suggest is to leave your project with the main peripherals and go together with the others to find at what point the problem is generated&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 18:47:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1619434#M21522</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-03-21T18:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1621930#M21602</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your advice.&lt;/P&gt;&lt;P&gt;I have a further question about the interrupt of SPI.&lt;/P&gt;&lt;P&gt;In the post below I notice that I setup the "&lt;SPAN&gt;asynchronous&amp;nbsp;mode" but sent the SPI data with "Synchronout mode". Can you tell where can I find the example of transmit SPI data with&amp;nbsp;asynchronous mode?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2023 01:00:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1621930#M21602</guid>
      <dc:creator>YL005</dc:creator>
      <dc:date>2023-03-25T01:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: S32K3 SPI Transmit Data is Interrupted</title>
      <link>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1622790#M21665</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/117564"&gt;@YL005&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Included in the RTDs are examples of LSPI.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 19:34:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3-SPI-Transmit-Data-is-Interrupted/m-p/1622790#M21665</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-03-27T19:34:01Z</dc:date>
    </item>
  </channel>
</rss>

