<?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 S32K312 EVB - SD Card SPI Initialization using LPSPI Hardware PCS0 in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K312-EVB-SD-Card-SPI-Initialization-using-LPSPI-Hardware-PCS0/m-p/2395751#M59890</link>
    <description>&lt;P class=""&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I am implementing an SD Card driver over SPI on the S32K312 EVB using RTD 6.0.0 (Non-AUTOSAR Lpspi_ Ip driver).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;According to the SD Physical Layer Simplified Specification, the SPI initialization sequence is:&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Keep CS HIGH after power-up.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Generate at least 74 clock pulses (I am sending 80 clocks by transmitting 10 bytes of 0xFF).&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Pull CS LOW.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Send CMD0 (0x40 00 00 00 00 95).&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Keep CS LOW while polling with 0xFF until the card responds with **R1 = 0x01`.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;My issue is with hardware-controlled PCS0.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;When using the Lpspi_Ip driver with hardware PCS0, the PCS signal is automatically asserted/deasserted by the LPSPI peripheral during SPI transfers. Because of this, I cannot generate the initial 80 clock pulses while keeping CS HIGH and then CMD0 with CS LOW, as required by the SD specification.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I have the following questions:&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Does the S32K312 LPSPI peripheral support keeping PCS inactive (HIGH) while generating SPI clocks?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Is there any Lpspi_Ip API, register configuration, or recommended method to manually control PCS or temporarily disable hardware PCS during the SD card initialization sequence?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;If not, is the recommended approach to configure the SD card CS pin as a GPIO and manually control it while using LPSPI only for SCK, MOSI, and MISO?&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Additionally, if NXP has any reference implementation, application note, example project, or SDK/RTD example demonstrating SD card communication over SPI on the S32K3 series, could you please share the reference?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Thank you.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jul 2026 07:12:41 GMT</pubDate>
    <dc:creator>parvathitp</dc:creator>
    <dc:date>2026-07-16T07:12:41Z</dc:date>
    <item>
      <title>S32K312 EVB - SD Card SPI Initialization using LPSPI Hardware PCS0</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-EVB-SD-Card-SPI-Initialization-using-LPSPI-Hardware-PCS0/m-p/2395751#M59890</link>
      <description>&lt;P class=""&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I am implementing an SD Card driver over SPI on the S32K312 EVB using RTD 6.0.0 (Non-AUTOSAR Lpspi_ Ip driver).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;According to the SD Physical Layer Simplified Specification, the SPI initialization sequence is:&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Keep CS HIGH after power-up.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Generate at least 74 clock pulses (I am sending 80 clocks by transmitting 10 bytes of 0xFF).&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Pull CS LOW.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Send CMD0 (0x40 00 00 00 00 95).&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Keep CS LOW while polling with 0xFF until the card responds with **R1 = 0x01`.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;My issue is with hardware-controlled PCS0.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;When using the Lpspi_Ip driver with hardware PCS0, the PCS signal is automatically asserted/deasserted by the LPSPI peripheral during SPI transfers. Because of this, I cannot generate the initial 80 clock pulses while keeping CS HIGH and then CMD0 with CS LOW, as required by the SD specification.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;I have the following questions:&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Does the S32K312 LPSPI peripheral support keeping PCS inactive (HIGH) while generating SPI clocks?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Is there any Lpspi_Ip API, register configuration, or recommended method to manually control PCS or temporarily disable hardware PCS during the SD card initialization sequence?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;If not, is the recommended approach to configure the SD card CS pin as a GPIO and manually control it while using LPSPI only for SCK, MOSI, and MISO?&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Additionally, if NXP has any reference implementation, application note, example project, or SDK/RTD example demonstrating SD card communication over SPI on the S32K3 series, could you please share the reference?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;Thank you.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2026 07:12:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-EVB-SD-Card-SPI-Initialization-using-LPSPI-Hardware-PCS0/m-p/2395751#M59890</guid>
      <dc:creator>parvathitp</dc:creator>
      <dc:date>2026-07-16T07:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: S32K312 EVB - SD Card SPI Initialization using LPSPI Hardware PCS0</title>
      <link>https://community.nxp.com/t5/S32K/S32K312-EVB-SD-Card-SPI-Initialization-using-LPSPI-Hardware-PCS0/m-p/2396089#M59902</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/255147"&gt;@parvathitp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The PCS (Peripheral Chip Select) signal is designed to be controlled by the LPSPI module. When a hardware PCS is selected, it is automatically asserted and deasserted by the LPSPI peripheral during SPI frame transfers.&lt;/P&gt;
&lt;P&gt;There is no dedicated API available to manually control a hardware PCS signal while it is assigned to the LPSPI module. Therefore, as you mentioned, the best approach for this case is to configure the CS pin as a GPIO.&lt;/P&gt;
&lt;P&gt;In this configuration, the CS signal is controlled through the SIUL2/GPIO APIs, and &lt;SPAN&gt;you are responsible for controlling it&lt;/SPAN&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently, there is no S32K3-specific application note, example project, or reference document that demonstrates this exact implementation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, VaneB&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2026 20:51:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K312-EVB-SD-Card-SPI-Initialization-using-LPSPI-Hardware-PCS0/m-p/2396089#M59902</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2026-07-16T20:51:04Z</dc:date>
    </item>
  </channel>
</rss>

