<?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 S32K144 spi slave mode  CS pin can Independent  detect? in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797934#M2677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use spi slave&amp;nbsp; as &lt;A data-keyword="communication"&gt;communication&lt;/A&gt; &lt;A data-keyword="interface"&gt;interface ,i need to&amp;nbsp;detect CS pin&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;A data-keyword="interface"&gt;Risin&lt;/A&gt;&lt;A data-keyword="interface"&gt;g edge and falling edge ,but&amp;nbsp; spi registor&amp;nbsp;Doesn't seem to support, can provide way to&amp;nbsp;&lt;/A&gt;&lt;A data-keyword="interface"&gt;detect&amp;nbsp;?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2018 14:53:35 GMT</pubDate>
    <dc:creator>建宽高</dc:creator>
    <dc:date>2018-10-16T14:53:35Z</dc:date>
    <item>
      <title>S32K144 spi slave mode  CS pin can Independent  detect?</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797934#M2677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use spi slave&amp;nbsp; as &lt;A data-keyword="communication"&gt;communication&lt;/A&gt; &lt;A data-keyword="interface"&gt;interface ,i need to&amp;nbsp;detect CS pin&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;A data-keyword="interface"&gt;Risin&lt;/A&gt;&lt;A data-keyword="interface"&gt;g edge and falling edge ,but&amp;nbsp; spi registor&amp;nbsp;Doesn't seem to support, can provide way to&amp;nbsp;&lt;/A&gt;&lt;A data-keyword="interface"&gt;detect&amp;nbsp;?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 14:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797934#M2677</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-10-16T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 spi slave mode  CS pin can Independent  detect?</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797935#M2678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to independently detect in your application the edges of CS you can connect another GPIO configured as input to CS. That pin should be configured to trigger interrupt request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using SDK and ProcessorExpert you should configure your GPIO like in this picture:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75740i548F8858A6BB4D99/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To install the interrupt request you must call these 2 functions in your application: INT_SYS_InstallHandler();INT_SYS_EnableIRQ();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 05:49:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797935#M2678</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2018-10-17T05:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 spi slave mode  CS pin can Independent  detect?</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797936#M2679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ,&amp;nbsp; i have try it as&amp;nbsp;General GPIO ,but&amp;nbsp; spi_slave_irq can not enter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so , spi slave mode can No CS detection required? that means&amp;nbsp; &amp;nbsp;spi slave&amp;nbsp; can not config cs pin ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 10:50:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797936#M2679</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-10-17T10:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 spi slave mode  CS pin can Independent  detect?</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797937#M2680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, now I understand your issue. I suppose that you want to use PCS events for other things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you take a look at the example project provided by SDK? There is an example which shows how to configure spi master and slave.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reasons for your problems can be: wrong polarity of the CS, bad handling of interrupt (flags and NVIC) or pins configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 11:08:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797937#M2680</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2018-10-17T11:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 spi slave mode  CS pin can Independent  detect?</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797938#M2681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Re-combing the SPI slave problem now encountered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- 1&amp;nbsp; &amp;nbsp; &amp;nbsp;I am now doing the following configuration for SPI slave&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75737i4437B287672762A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following spi slave send interface to send a single byte&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;&amp;nbsp;LPSPI_DRV_SlaveTransfer(USE_SPI_INSATNCE,(const uint8&amp;nbsp; *)&amp;amp;send,(uint8 *)&amp;amp;rcv,(uint16)1);&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;When my spi master sends a byte of data, the slave can enter the interrupt, as shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75780i8900A1A5A42105ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- 2&amp;nbsp; &amp;nbsp;When the chip select is configured as a normal GPIO port&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75801i6AE5F8CDCA06EAB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75835i6381EC1C31593988/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following spi slave send interface to send a single byte&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;&amp;nbsp;LPSPI_DRV_SlaveTransfer(USE_SPI_INSATNCE,(const uint8&amp;nbsp; *)&amp;amp;send,(uint8 *)&amp;amp;rcv,(uint16)1);&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;When my spi master sends a byte of data, the slave can enter the interrupt transmit error, as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75884i43CFE388D452967F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have doubts, can the spi slave CS select pin can be used as normal GPIO for rising edge and falling edge detection, reading SPI slave data？&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 01:51:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797938#M2681</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-10-18T01:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 spi slave mode  CS pin can Independent  detect?</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797939#M2682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The right approach to make LPSPI to work fine is the first one. I have only one suggestion: please set the direction as input for PTB0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have suggested to use another GPIO (not PTB0) if you want to detect rising and falling edges for other purpose than LPSPI data transfers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this&amp;nbsp;answer doesn't help you please try to provide details about your usecase to figure out how you should configure SDK drivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 05:53:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797939#M2682</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2018-10-18T05:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 spi slave mode  CS pin can Independent  detect?</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797940#M2683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have solved this way. First, PB0 is configured as the CS pin of the hardware, and then when the software is initialized, it is configured as a bilateral edge trigger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;PINS_DRV_SetPinIntSel(PORTB, 0, PORT_INT_EITHER_EDGE);&lt;BR /&gt; /* Install hander for spi_master_Det ISR */&lt;BR /&gt; INT_SYS_InstallHandler(PORTB_IRQn, spi_cs_det, (isr_t *)0);&lt;BR /&gt; /* Enable button spi_master_Det IRQ */&lt;BR /&gt; INT_SYS_EnableIRQ(PORTB_IRQn);&lt;BR /&gt; INT_SYS_SetPriority(PORTB_IRQn, 1);&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 09:02:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-spi-slave-mode-CS-pin-can-Independent-detect/m-p/797940#M2683</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-10-23T09:02:29Z</dc:date>
    </item>
  </channel>
</rss>

