<?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: LPCXpresso simple I2C example HELP</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560335#M15822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Kaare on Mon Sep 03 23:44:33 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it's the CONCLR register :o)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't read the register in the source.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the register viewer in the IDE. But if the register simply can't be read, this will also not be possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I remember this problem with ARM7 and another IDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this is not a problem then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the problem is still, why the NXP example does not work: I can't figure out why I dont get an interrupt after a START condition is started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;br&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kaare&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:18:00 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:18:00Z</dc:date>
    <item>
      <title>LPCXpresso simple I2C example HELP</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560331#M15818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Kaare on Thu Aug 30 15:24:30 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to hook up two LPCXpresso boards for a simple I2C test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Step 1 is to make a Master and a Slave, and let Master write/read some data from the slave.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are complete examples for this on the LPCXpresso site.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;They compile fine, but it does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When debugging, I see that I never get a single interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Interrupt seems to be OK enabled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What seems strange though, is when I enable the I2C:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_I2C-&amp;gt;CONSET = I2CONSET_I2EN;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=black]Then the bit for enable is set in both I2C0CONSET and -CLR registers.[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]The same thing happens when i will make a START:[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000][/COLOR][/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_I2C-&amp;gt;CONSET = I2CONSET_STA;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=black]Then both the enable and clear bit in both registers are set.[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000][/COLOR][/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]Why is this happening?[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]Then it is both set and cleared at the same time... not good I think.[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]Who wins the: the CLR or the SET?[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000][/COLOR][/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]Does anyone have a clue if this is good or bad?[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000][/COLOR][/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]I am using the examples as-is, in LPCXpresso IDE.[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]LPC1343 as Master board.[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000][/COLOR][/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]Thanks in advance[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3][COLOR=#000000]Kåre[/COLOR][/SIZE][/SIZE][SIZE=2][/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][/COLOR][/SIZE][/COLOR][/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560331#M15818</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso simple I2C example HELP</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560332#M15819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CroesJeroen on Thu Aug 30 15:38:09 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I would use in stead of :&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_I2C-&amp;gt;CONSET = I2CONSET_I2EN;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-&amp;gt; &lt;/SPAN&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;LPC_I2C-&amp;gt;CONSET |= I2CONSET_I2EN;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;also for the start. Otherwise youre setting the start bit and disabling the I2C module. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Youre doing an assignment to the register but set all bits to 0 except the ones you defined with I2EN and STA. You have to do an or to not change the value of the other bits.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560332#M15819</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso simple I2C example HELP</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560333#M15820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Kaare on Fri Aug 31 00:55:38 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is not true:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The CON register is controlled by a Reset and a Set register (CONSET, CONRST).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Writing a 1 to a bit wil set/reset the bit in the CON register.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Writing a 0 does nothing. The example is therefore OK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is that when I set a 1 in CONSET, the same bit is set in the CONRST register, and this makes no sense to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And do I have to set the bit to 0 again manually?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;br&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kåre&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560333#M15820</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso simple I2C example HELP</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560334#M15821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cfb on Fri Aug 31 01:29:15 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the CONRST register you are referring to? I can't see any reference to it in the User Manual. If you meant to say CONCLR that is a write-only register so you shouldn't try to make any sense out of any value that you have read from it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560334#M15821</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso simple I2C example HELP</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560335#M15822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Kaare on Mon Sep 03 23:44:33 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it's the CONCLR register :o)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't read the register in the source.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the register viewer in the IDE. But if the register simply can't be read, this will also not be possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I remember this problem with ARM7 and another IDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this is not a problem then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the problem is still, why the NXP example does not work: I can't figure out why I dont get an interrupt after a START condition is started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;br&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kaare&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:18:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560335#M15822</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso simple I2C example HELP</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560336#M15823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Kaare on Tue Sep 04 03:24:51 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems to work now!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that the example is extremely simple, and I have to powercycle for each test, as the program just ends in a while(1)...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;br&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kåre&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:18:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-simple-I2C-example-HELP/m-p/560336#M15823</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:18:00Z</dc:date>
    </item>
  </channel>
</rss>

