<?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>Kinetis Microcontrollers中的主题 Re: LPC1343FBD48 I2C setting</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPC1343FBD48-I2C-setting/m-p/494789#M30702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your interest in NXP products.&lt;BR /&gt; We are happy to support you through our communities, unfortunately we temporarily have a community structure with two parallel systems which has probably not guided you correctly.&lt;BR /&gt; Be ensured we are working on fixing the navigation and the offering as soon as we can.&lt;BR /&gt; &lt;BR /&gt; In the meantime, please re-post your question into the monitored space for this product line:&lt;BR /&gt; &lt;A href="https://www.lpcware.com/forums/microprocessor-forums/lpc13xx" title="https://www.lpcware.com/forums/microprocessor-forums/lpc13xx"&gt;lpc13xx | www.LPCware.com&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt; &lt;BR /&gt; You may find the following page helpful for navigating to the right spaces:&lt;BR /&gt;&lt;/SPAN&gt;&lt;A href="https://www.lpcware.com/" title="https://www.lpcware.com/"&gt;Welcome to LPCware.com! | www.LPCware.com&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2016 22:33:00 GMT</pubDate>
    <dc:creator>vicentegomez</dc:creator>
    <dc:date>2016-02-10T22:33:00Z</dc:date>
    <item>
      <title>LPC1343FBD48 I2C setting</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPC1343FBD48-I2C-setting/m-p/494788#M30701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello My name is Hiroshi Iwasaki and one of our customer is using LPC1343 and faced I2C problem now.&lt;/P&gt;&lt;P&gt;Customer is testing&amp;nbsp; I2C by using LPCXpresso Board OM13045 now.&lt;/P&gt;&lt;P&gt;Problem&lt;/P&gt;&lt;P&gt; They set I2C Pin configuration and De-assert as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0_4 = 0x01; // PIO0_4 as SCL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_IOCON-&amp;gt;PIO0_5 = 0x01; // PIO0_5 as SDA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;PRESETCTRL |= 0x02; // De-asset I2C reset&lt;/P&gt;&lt;P&gt;And waiting for I2C interrupt but no interrupt was occurred.&lt;/P&gt;&lt;P&gt;Read back pin data is always ZERO this mean GPIO not I2C Pin.&lt;/P&gt;&lt;P&gt;IOCON (LPC1434) 0X40044030 = All Zero&lt;/P&gt;&lt;P&gt;0x40004404C= All Zero&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test&lt;/P&gt;&lt;P&gt;include "LPC13xx.h"&lt;BR /&gt;#include "SC16IS740I2C.h"&lt;BR /&gt;#include "GPIO.h"&lt;BR /&gt;#include "IF.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;cr_section_macros.h&amp;gt;&lt;BR /&gt;#include &amp;lt;NXP/crp.h&amp;gt;&lt;/P&gt;&lt;P&gt;// __CRP const unsigned int CRP_WORD = CRP_NO_CRP ;&lt;/P&gt;&lt;P&gt;int main(void) {&lt;BR /&gt; &lt;BR /&gt; volatile static int i = 0;&lt;BR /&gt; volatile unsigned l, j, k ;&lt;BR /&gt; volatile unsigned char sw;&lt;/P&gt;&lt;P&gt;LPC_SYSCON-&amp;gt;PRESETCTRL |= 0x02; // De-asset I2C reset&lt;BR /&gt; &lt;BR /&gt; LPC_IOCON-&amp;gt;PIO0_4 = 0x01; // PIO0_4 as SCL&lt;BR /&gt; LPC_IOCON-&amp;gt;PIO0_5 = 0x01; // PIO0_5 as SDA&lt;BR /&gt; &lt;BR /&gt; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (1&amp;lt;&amp;lt;5);// Enable for I2C clock&lt;BR /&gt; LPC_SYSCON-&amp;gt;PRESETCTRL |= 0x02; // De-asset I2C reset&lt;/P&gt;&lt;P&gt; LPC_I2C-&amp;gt;SCLL = 350; // SCL Low&lt;BR /&gt; LPC_I2C-&amp;gt;SCLH = 350; // SCL High&lt;/P&gt;&lt;P&gt; NVIC_EnableIRQ(I2C_IRQn); // Enable I2C interrupt&lt;/P&gt;&lt;P&gt; LPC_I2C-&amp;gt;CONCLR = 0x6c; // I2C flagClear&lt;BR /&gt; LPC_I2C-&amp;gt;CONSET = 0x40; // I2C enable&lt;/P&gt;&lt;P&gt; LPC_I2C-&amp;gt;CONSET = 0x20; // assert Start&lt;/P&gt;&lt;P&gt;// Enter an infinite loop, just incrementing a counter&lt;/P&gt;&lt;P&gt; while(1) {i++ ;}&lt;BR /&gt;&amp;nbsp; return 0 ;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void I2C_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;uint8_t StatValue;&lt;BR /&gt;int adrs=SC16IS740_LCR_ADR;&lt;BR /&gt;int dat =SC16IS740_LCR_DATA;&lt;BR /&gt;static int t=1;&lt;/P&gt;&lt;P&gt; StatValue= LPC_I2C-&amp;gt;STAT;&lt;BR /&gt; switch ( StatValue )&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; case 0x08: //Now Status is Start&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;DAT =SC16IS740_ADDR; //Device address 1010 000 + Write&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;CONCLR = 0x28; //clear interrupt flag + set next action&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR /&gt;&amp;nbsp; case 0x18: //Now Status is SLA+W and Receive ACK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;DAT =adrs; //Address&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;CONCLR = 0x08; //clear interrupt flag&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR /&gt;&amp;nbsp; case 0x28: //Now Status is sending Data byte and Receive ACK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(t==1){ // 1st : Data byte is address&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;DAT = dat; // write data&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;CONCLR = 0x08;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else { // 2nd : Data byte is write data&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;CONSET = 0x10; //send stop command&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;CONCLR = 0x08; //Clear interrupt&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(LPC_I2C-&amp;gt;CONSET &amp;amp; 0x00000010); //waiting STOP flag&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_I2C-&amp;gt;CONCLR = 0x48; //Clear interrupt &amp;amp; Disable I2c &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++t;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR /&gt;&amp;nbsp; default:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice to clear this problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 06:14:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPC1343FBD48-I2C-setting/m-p/494788#M30701</guid>
      <dc:creator>hiroshiiwasaki</dc:creator>
      <dc:date>2016-02-08T06:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1343FBD48 I2C setting</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPC1343FBD48-I2C-setting/m-p/494789#M30702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your interest in NXP products.&lt;BR /&gt; We are happy to support you through our communities, unfortunately we temporarily have a community structure with two parallel systems which has probably not guided you correctly.&lt;BR /&gt; Be ensured we are working on fixing the navigation and the offering as soon as we can.&lt;BR /&gt; &lt;BR /&gt; In the meantime, please re-post your question into the monitored space for this product line:&lt;BR /&gt; &lt;A href="https://www.lpcware.com/forums/microprocessor-forums/lpc13xx" title="https://www.lpcware.com/forums/microprocessor-forums/lpc13xx"&gt;lpc13xx | www.LPCware.com&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt; &lt;BR /&gt; You may find the following page helpful for navigating to the right spaces:&lt;BR /&gt;&lt;/SPAN&gt;&lt;A href="https://www.lpcware.com/" title="https://www.lpcware.com/"&gt;Welcome to LPCware.com! | www.LPCware.com&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 22:33:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/LPC1343FBD48-I2C-setting/m-p/494789#M30702</guid>
      <dc:creator>vicentegomez</dc:creator>
      <dc:date>2016-02-10T22:33:00Z</dc:date>
    </item>
  </channel>
</rss>

