<?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 Implementing always-ready SPI slave with S32K and FreeRTOS in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1317060#M11506</link>
    <description>&lt;P&gt;Dear community members,&lt;/P&gt;&lt;P&gt;I am wondering how we can implement an always-ready SPI slave with S32K14x MCU and FreeRTOS?&lt;/P&gt;&lt;P&gt;By "always-ready" means that whenever the SPI master starts a duplex transfer by toggling the CS line, the MCU can respond immediately with data in an outgoing queue.&lt;/P&gt;&lt;P&gt;I am considering to have an ISR triggered by the CS line, within the ISR we initiate a SPI slave xfer using SPI device or PAL driver. But I am unsure if the ISR can respond fast enough? Should we ask the SPI master side to wait a while before sending the SCLK signals after toggleing the CS line?&lt;/P&gt;&lt;P&gt;If this works in general, what details should we watch (e.g. ISR priority etc)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;yf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Aug 2021 06:04:16 GMT</pubDate>
    <dc:creator>yfliu</dc:creator>
    <dc:date>2021-08-03T06:04:16Z</dc:date>
    <item>
      <title>Implementing always-ready SPI slave with S32K and FreeRTOS</title>
      <link>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1317060#M11506</link>
      <description>&lt;P&gt;Dear community members,&lt;/P&gt;&lt;P&gt;I am wondering how we can implement an always-ready SPI slave with S32K14x MCU and FreeRTOS?&lt;/P&gt;&lt;P&gt;By "always-ready" means that whenever the SPI master starts a duplex transfer by toggling the CS line, the MCU can respond immediately with data in an outgoing queue.&lt;/P&gt;&lt;P&gt;I am considering to have an ISR triggered by the CS line, within the ISR we initiate a SPI slave xfer using SPI device or PAL driver. But I am unsure if the ISR can respond fast enough? Should we ask the SPI master side to wait a while before sending the SCLK signals after toggleing the CS line?&lt;/P&gt;&lt;P&gt;If this works in general, what details should we watch (e.g. ISR priority etc)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;yf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 06:04:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1317060#M11506</guid>
      <dc:creator>yfliu</dc:creator>
      <dc:date>2021-08-03T06:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing always-ready SPI slave with S32K and FreeRTOS</title>
      <link>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1318106#M11539</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/184695"&gt;@yfliu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Please refer to the description of the transmit FIFO in the Slave mode:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1628076835533.png" style="width: 632px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/151776iE402528CB0DCB44F/image-dimensions/632x180?v=v2" width="632" height="180" role="button" title="danielmartynek_0-1628076835533.png" alt="danielmartynek_0-1628076835533.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I think the best solution is to fill the transmit FIFO whenever the number of words in the FIFO drop below a certain level.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1628076964137.png" style="width: 613px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/151777i0939A64D03CE2C27/image-dimensions/613x186?v=v2" width="613" height="186" role="button" title="danielmartynek_1-1628076964137.png" alt="danielmartynek_1-1628076964137.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 11:37:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1318106#M11539</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-08-04T11:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing always-ready SPI slave with S32K and FreeRTOS</title>
      <link>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1322920#M11677</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the design idea and sorry for my late reply.&lt;/P&gt;&lt;P&gt;Do you think if I can acheive the above idea using SPI_PAL library? or I have to use low-level drivers library?&lt;/P&gt;&lt;P&gt;I am wondering if I can use `SPI_SlaveTransfer()` within the TDF ISR callback?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yanfeng&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 03:30:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1322920#M11677</guid>
      <dc:creator>yfliu</dc:creator>
      <dc:date>2021-08-13T03:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing always-ready SPI slave with S32K and FreeRTOS</title>
      <link>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1323943#M11703</link>
      <description>&lt;P&gt;Hi Yanfeng,&lt;/P&gt;
&lt;P&gt;Looking at the callbacks.h header file, there is no TDF callback event just the SPI_EVENT_END_TRANSFER.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1629121601318.png" style="width: 531px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152983i27B999A41B85DA37/image-dimensions/531x138?v=v2" width="531" height="138" role="button" title="danielmartynek_0-1629121601318.png" alt="danielmartynek_0-1629121601318.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 13:47:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Implementing-always-ready-SPI-slave-with-S32K-and-FreeRTOS/m-p/1323943#M11703</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-08-16T13:47:31Z</dc:date>
    </item>
  </channel>
</rss>

