<?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 SPI - clock polarity in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/SPI-clock-polarity/m-p/1205541#M4581</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am using DSC (56F84567) as master SPI. the slave chip read data bit on clock rising edge. However, setting the SPI clock to "rising edge" dont give any setup time to data to be stable before sending the clock, so the slave can't read the data.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rising_edge.jpg" style="width: 894px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133748i55A244554D28088E/image-size/large?v=v2&amp;amp;px=999" role="button" title="rising_edge.jpg" alt="rising_edge.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When setting the clock polarity to falling edge, the clock is shifted and the slave can read the data &lt;FONT color="#FF0000"&gt;on rising edge.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="falling_edge.jpg" style="width: 880px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133749iCD864C8026B9E6AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="falling_edge.jpg" alt="falling_edge.jpg" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Is there a way in SPI component to set the data stabilization time by shifting the clock?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jan 2021 11:22:43 GMT</pubDate>
    <dc:creator>Ben</dc:creator>
    <dc:date>2021-01-01T11:22:43Z</dc:date>
    <item>
      <title>SPI - clock polarity</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/SPI-clock-polarity/m-p/1205541#M4581</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am using DSC (56F84567) as master SPI. the slave chip read data bit on clock rising edge. However, setting the SPI clock to "rising edge" dont give any setup time to data to be stable before sending the clock, so the slave can't read the data.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rising_edge.jpg" style="width: 894px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133748i55A244554D28088E/image-size/large?v=v2&amp;amp;px=999" role="button" title="rising_edge.jpg" alt="rising_edge.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When setting the clock polarity to falling edge, the clock is shifted and the slave can read the data &lt;FONT color="#FF0000"&gt;on rising edge.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="falling_edge.jpg" style="width: 880px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133749iCD864C8026B9E6AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="falling_edge.jpg" alt="falling_edge.jpg" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Is there a way in SPI component to set the data stabilization time by shifting the clock?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jan 2021 11:22:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/SPI-clock-polarity/m-p/1205541#M4581</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2021-01-01T11:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: SPI - clock polarity</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/SPI-clock-polarity/m-p/1205789#M4582</link>
      <description>&lt;P&gt;Hi, Benny,&lt;/P&gt;
&lt;P&gt;First of all, can you tell us the signal name for the screenshot of the scope?&lt;/P&gt;
&lt;P&gt;BTW, I see that the SPI of MC56F84567 is master, based on the SPI protocol, when the SPI is idle, the /SS pin should be high, there should not be clock signal within the high logic of /SS.&lt;/P&gt;
&lt;P&gt;Can you tell us whether the /SS signal is generated by the SPI module itself or GPIO pin controlled by firmware?&lt;/P&gt;
&lt;P&gt;This is the SPI timing:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1609739604255.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133797i7210E42644C95BE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1609739604255.png" alt="xiangjun_rong_0-1609739604255.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;From above spi timing, you can see that the rising edge of SCLK triggers the data pin MOSI to be valid, falling edge of SCLK will latch the data pin on the slave SPI receiver. So the setting up time is half clock cycle time of SCLK, the holding time is the half of the SCLK cycle time.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 05:58:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/SPI-clock-polarity/m-p/1205789#M4582</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-01-04T05:58:13Z</dc:date>
    </item>
  </channel>
</rss>

