<?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>LPCXpresso IDEのトピックRe: Spi scr</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530323#M1920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri May 18 07:42:30 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you haven't changed SPI0 clock divider register (SSP0CLKDIV) it's still 0 (reset value) :rolleyes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then your SPI0_PCLK is main clock / (0+1) = main clock :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
 LPC_SSP0-&amp;gt;CPSR = 0x2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //clock prescaler, use even, minimum is 2
 LPC_SSP0-&amp;gt;CR0 = 0x0107;&amp;nbsp;&amp;nbsp;&amp;nbsp; //SCR =1, 8bit
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;With:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SSP frequency = PCLK / (CPSDVSR x [SCR+1]) = 48MHz / (2*2) = 12MHz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And, surprise, Scope shows 12MHz &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:16:46 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:16:46Z</dc:date>
    <item>
      <title>Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530319#M1916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by VCAV on Thu May 17 12:07:10 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone help me how to choose the SCR in the SSP initialization?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the example it was selected 15...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Set DSS data to 8-bit, Frame format SPI, CPOL = 0, CPHA = 0, and SCR is 15 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_SSP0-&amp;gt;CR0 = 0x0707;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;could someone tell my why?:confused: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530319#M1916</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530320#M1917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Thu May 17 12:25:06 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't know which mcu you are using, but a lot of manuals are describing SCR: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;15:8 SCR Serial Clock Rate. The number of prescaler-output clocks per bit on the bus, minus one. Given that CPSDVSR is the prescale divider, and the APB clock PCLK clocks the prescaler, the bit frequency is PCLK / (CPSDVSR x [SCR+1]).&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;So your SCR isn't 15 :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530320#M1917</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530321#M1918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by frame on Fri May 18 01:56:32 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I suggest to get some (working) example code, and dissect it with the help of the reference manual. Even better when the example code includes comments... ;-)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's the way I do it often.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530321#M1918</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530322#M1919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by VCAV on Fri May 18 07:08:22 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi My mistake, I forgot the MCU :o &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the LPC1114&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;So your SCR isn't 15 &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the NXPs code example, and thats why I got confused &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;07 should be 7 the SCR, and is commented 15...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway I could not find the SPI0_PCKL in the code example, to discover the SPI clock...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestion?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530322#M1919</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530323#M1920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri May 18 07:42:30 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you haven't changed SPI0 clock divider register (SSP0CLKDIV) it's still 0 (reset value) :rolleyes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then your SPI0_PCLK is main clock / (0+1) = main clock :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
 LPC_SSP0-&amp;gt;CPSR = 0x2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //clock prescaler, use even, minimum is 2
 LPC_SSP0-&amp;gt;CR0 = 0x0107;&amp;nbsp;&amp;nbsp;&amp;nbsp; //SCR =1, 8bit
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;With:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SSP frequency = PCLK / (CPSDVSR x [SCR+1]) = 48MHz / (2*2) = 12MHz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And, surprise, Scope shows 12MHz &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530323#M1920</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530324#M1921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Pellek on Tue May 22 00:41:35 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[LEFT]I got a question about this same register :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm using LPC11U14 as a slave, and receive the clock from an other IC. Does it change anything to use this register ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/LEFT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530324#M1921</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530325#M1922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Tue May 22 00:59:00 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Pellek&lt;/STRONG&gt;&lt;BR /&gt;Does it change anything to use this register ? &lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, as mentioned above this register is using your main clock as source. Which clock source you use for main clock is your decision :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530325#M1922</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530326#M1923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Pellek on Tue May 22 01:12:27 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I wasn't clear,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my 11U14 is a slave in the SPI communication but has its own clock for all other operations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So there is main clock, and there is a clock on sclk1. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If i m right, this register would prescale the clock if it were main clock, but has no interference if µC is a slave. got it ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530326#M1923</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Spi scr</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530327#M1924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Tue May 22 01:39:20 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;So we are talking about SCK :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As slave SCR isn't used because a slave is receiving SCK from master.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So changing SCR has no effect for slaves.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:16:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Spi-scr/m-p/530327#M1924</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:16:49Z</dc:date>
    </item>
  </channel>
</rss>

