<?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: LPC1227 SPI problem in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584580#M26337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Sphoenix on Thu Sep 05 03:39:24 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;@capiman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I go post on the 43xx forum !&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SPI_CR_MSTR_Msk if define as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(1 &amp;lt;&amp;lt; SPI_CR_MSTR_Pos) wich make 0xA0 when i printed it on debug (the value i wanted)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reply !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;EDIT : Solution on this topic, thanks capiman ! =&amp;gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fspi-lpc43xx-always-return-0%23comment-1131904" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/spi-lpc43xx-always-return-0#comment-1131904&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:45:45 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:45:45Z</dc:date>
    <item>
      <title>LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584575#M26332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by matutef1 on Fri Nov 23 09:29:53 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to use a spi flash memory (Atmel AT45DB041) which I have already used with a LPC1756 with no problems. But i can't get it working with LPC1227.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use manual chip selection, I see the clock signal and it looks good, even MOSI and MISO signals are good. But I always read a 0 on DR register.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried several pieces of code, but I always read a 0 on DR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a similar problem or a working piece of code that could help me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584575#M26332</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584576#M26333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by haricharan on Wed Sep 04 20:51:39 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Me too had same problem. I'm trying to use a spi flash memory (Atmel SST25VF064C), i can't get it working with LPC1227.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I see the clock signal and it looks good, even MOSI and MISO signals are good. But I always read a 0 on DR register.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried several pieces of code, but I always read a 0 on DR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a similar problem or a working piece of code that could help me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584576#M26333</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584577#M26334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Sphoenix on Thu Sep 05 01:10:05 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having the same problem on LPC4357 with MAX11200 (EDIT : i already use spi with MAX11200 on arduino uno with success).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked the MOSI, MISO and SLCK line with a scope and they are good (they nerver send 0).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to connect MOSI and MISO line but still 0 on DR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here the functions i use to init and shift data :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void init_protocol()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SPI-&amp;gt;CR = SPI_CR_MSTR_Msk;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SPI-&amp;gt;CCR = 128;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SCU-&amp;gt;SFSP3_6 = 1; // MISO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_GPIO_PORT-&amp;gt;DIR[0] &amp;amp;= ~(1&amp;lt;&amp;lt;6) | 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SCU-&amp;gt;SFSP3_7 = 1; // MOSI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_GPIO_PORT-&amp;gt;DIR[5] |= (1UL &amp;lt;&amp;lt; 10) | 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SCU-&amp;gt;SFSP3_3 = 1; // SCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SCU-&amp;gt;SFSP3_8 = 4; // SSEL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_GPIO_PORT-&amp;gt;DIR[5] |= (1UL&amp;lt;&amp;lt;11) | 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t spi_transfert(int data)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; uint32_t tmp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SPI-&amp;gt;DR = data;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; while (!(LPC_SPI-&amp;gt;SR &amp;amp; SPI_SR_SPIF_Msk))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; };&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; tmp = LPC_SPI-&amp;gt;DR;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return (tmp);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584577#M26334</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584578#M26335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by capiman on Thu Sep 05 01:18:49 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;@all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please create your own threads if you want to report a problem, which is different to the original post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can off course add a link to the old thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Especially when the subject says: LPC1227 and your problem is on a completely different uC like LPC4357,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this leads only to the use of the wrong documentation and hints.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Sphoenix&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In your init routine, you seem to use SPI_CR_MSTR_Msk, which looks like being a mask for a certain field, no real value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you check what value SPI_CR_MSTR_Msk has and what value LPC_SPI-&amp;gt;CR gets and if this is really &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the value you want to have in register CR (compare with user manual!!!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not looked into your other code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584578#M26335</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584579#M26336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by capiman on Thu Sep 05 01:21:23 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;@haricharan&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you post the code you are using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You know that with SPI you can't just read something from DR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Only when you send 1 byte and wait till it is finished and wait till you have received something,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you can read 1 byte from DR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no help with "I've tried several pieces of code". Try to understand the code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you are using and try to fix what is wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584579#M26336</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584580#M26337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Sphoenix on Thu Sep 05 03:39:24 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;@capiman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I go post on the 43xx forum !&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SPI_CR_MSTR_Msk if define as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(1 &amp;lt;&amp;lt; SPI_CR_MSTR_Pos) wich make 0xA0 when i printed it on debug (the value i wanted)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reply !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;EDIT : Solution on this topic, thanks capiman ! =&amp;gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fspi-lpc43xx-always-return-0%23comment-1131904" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/spi-lpc43xx-always-return-0#comment-1131904&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584580#M26337</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584581#M26338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Sphoenix on Thu Sep 05 03:44:32 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply capiman !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My previous message was delete when i tried to edit it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Maybe a part of the solution here, thanks capiman : &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fspi-lpc43xx-always-return-0%23comment-1131904" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/spi-lpc43xx-always-return-0#comment-1131904&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584581#M26338</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1227 SPI problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584582#M26339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by haricharan on Fri Sep 06 02:50:49 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;@capiman&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank u for ur answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But i could not able to fix what was the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My Code is as follows which is attached. Please see and reply me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:45:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1227-SPI-problem/m-p/584582#M26339</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:45:46Z</dc:date>
    </item>
  </channel>
</rss>

