<?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: switching the CS Pin of LPSPI (S32K3) in S32K</title>
    <link>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1367399#M12668</link>
    <description>&lt;P&gt;Hello JoDo,&lt;/P&gt;
&lt;P&gt;I see, thank you.&lt;/P&gt;
&lt;P&gt;The driver does not allow that.&lt;/P&gt;
&lt;P&gt;And even if it allowed that by re-initializing the whole driver, I don't think you would achieve a precise timing because of the SW overhead.&lt;/P&gt;
&lt;P&gt;You can modify the registers of LPSPI module directly.&lt;/P&gt;
&lt;P&gt;Or you can disable LPSPI PCS and use the GPIO function of the pin instead, either just for the wakeup pulses or the whole time even for the SPI transfers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Fri, 05 Nov 2021 15:23:07 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2021-11-05T15:23:07Z</dc:date>
    <item>
      <title>switching the CS Pin of LPSPI (S32K3)</title>
      <link>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1365693#M12642</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to implement a NXP battery cell controller driver (MC33771C) with a TPL transceiver into a S32K344 controller.&lt;/P&gt;&lt;P&gt;The MC33771C needs a special pattern via the SPI-CS-PIN for wake up, but I could not find, in RTD 1.0.0, a suitable function which I could use for this purpose.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the S32K1 controller, for example, there is this function "LPSPI_DRV_SetPcs(LPSPITPLTX,BCC_TX1_LPSPI_PCS,LPSPI_ACTIVE_HIGH);"&lt;/P&gt;&lt;P&gt;Is there a possibility to control the CS pin via RTD or can it only be solved with programming the proper registers in the S32K344?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regard,&lt;/P&gt;&lt;P&gt;JoDo&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 10:12:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1365693#M12642</guid>
      <dc:creator>JoDo</dc:creator>
      <dc:date>2021-11-03T10:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: switching the CS Pin of LPSPI (S32K3)</title>
      <link>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1366817#M12653</link>
      <description>&lt;P&gt;Hello JoDo,&lt;/P&gt;
&lt;P&gt;You need to create a separate configuration for the second device controlled by the PCS.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1636040069681.png" style="width: 778px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/161305i69D50B3EC0A339E7/image-dimensions/778x356?v=v2" width="778" height="356" role="button" title="danielmartynek_0-1636040069681.png" alt="danielmartynek_0-1636040069681.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And then use the generated structure as an argument in the Transmit() function.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1636040176801.png" style="width: 964px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/161306i2C77AD8F4C50EB39/image-dimensions/964x54?v=v2" width="964" height="54" role="button" title="danielmartynek_1-1636040176801.png" alt="danielmartynek_1-1636040176801.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>Thu, 04 Nov 2021 15:36:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1366817#M12653</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-11-04T15:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: switching the CS Pin of LPSPI (S32K3)</title>
      <link>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1367223#M12665</link>
      <description>&lt;P&gt;Hello&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;Thanks for the answer. There is no second device, only one connected to a TPL transceiver via SPI-TX (master) and SPI-RX (slave). I need to send a wake-up pattern via the MC33664, this requires pulsing the CS pin of the SPI-TX without sending data via MOSI (see the pictures and code below).&lt;/P&gt;&lt;P&gt;One way is to change the polarity of the CS pin (CS idle low /high) by re-initializing the SPI-TX, but maybe there is a better way to control the CS pin?&lt;/P&gt;&lt;P&gt;Figure: MCU TPL transceiver schematics:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoDo_1-1636099666622.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/161387iB690E2B4AB8F8CFA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoDo_1-1636099666622.png" alt="JoDo_1-1636099666622.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Figure: MCU sends wake-up pattern via TPL transceiver&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoDo_2-1636099824535.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/161389iCFDFAF8D8AA1E287/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoDo_2-1636099824535.png" alt="JoDo_2-1636099824535.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code: Wake-up pattern suggested by NXP driver&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    /*Wake up Pattern */
/* CSB_TX low for 25 us. */
    BCC_MCU_WriteCsbPin(0);
    BCC_MCU_WaitUs(BCC_WAKE_PULSE_US);

    /* CSB_TX high for 600 us. */
    BCC_MCU_WriteCsbPin(1);
    BCC_MCU_WaitUs(BCC_T_WAKE_DELAY_US);

    /* CSB_TX low for 25 us. */
    BCC_MCU_WriteCsbPin(0);
    BCC_MCU_WaitUs(BCC_WAKE_PULSE_US);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JoDo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 08:43:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1367223#M12665</guid>
      <dc:creator>JoDo</dc:creator>
      <dc:date>2021-11-05T08:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: switching the CS Pin of LPSPI (S32K3)</title>
      <link>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1367399#M12668</link>
      <description>&lt;P&gt;Hello JoDo,&lt;/P&gt;
&lt;P&gt;I see, thank you.&lt;/P&gt;
&lt;P&gt;The driver does not allow that.&lt;/P&gt;
&lt;P&gt;And even if it allowed that by re-initializing the whole driver, I don't think you would achieve a precise timing because of the SW overhead.&lt;/P&gt;
&lt;P&gt;You can modify the registers of LPSPI module directly.&lt;/P&gt;
&lt;P&gt;Or you can disable LPSPI PCS and use the GPIO function of the pin instead, either just for the wakeup pulses or the whole time even for the SPI transfers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Fri, 05 Nov 2021 15:23:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1367399#M12668</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-11-05T15:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: switching the CS Pin of LPSPI (S32K3)</title>
      <link>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1938790#M40023</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have the same problem as above. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you tell me more detailed solutions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you share a simple sample code how to implement to create wakeup pulse pattern on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MC33664 through CS pin in LPSPI?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Junny&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 01:24:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/1938790#M40023</guid>
      <dc:creator>JunnyKim</dc:creator>
      <dc:date>2024-08-23T01:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: switching the CS Pin of LPSPI (S32K3)</title>
      <link>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/2205336#M54505</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/233627"&gt;@JunnyKim&lt;/a&gt;&amp;nbsp;Did you manage to find this (example) code?&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 17:41:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/switching-the-CS-Pin-of-LPSPI-S32K3/m-p/2205336#M54505</guid>
      <dc:creator>Djuric</dc:creator>
      <dc:date>2025-11-14T17:41:41Z</dc:date>
    </item>
  </channel>
</rss>

