<?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: I2C configuration in LPC845 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916882#M56520</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;With the configuration:&lt;/P&gt;
&lt;P&gt;case 1:&lt;/P&gt;
&lt;P&gt;30mHz I2C clock:&lt;/P&gt;
&lt;P&gt;CLKDIV=0x03&lt;/P&gt;
&lt;P&gt;MSTTIME=0x77&lt;/P&gt;
&lt;P&gt;The I2C baudrate is 30Mhz/((3+1)(7+2+7+2))=416Khz.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;case 2:&lt;/P&gt;
&lt;P&gt;If you want to get 100KHz I2C baud rate, you can select the parameter:&lt;/P&gt;
&lt;P&gt;CLKDIV=15,&lt;/P&gt;
&lt;P&gt;MSTTIME=0x77;&lt;/P&gt;
&lt;P&gt;The I2C baudrate is 30Mhz/((15+1)(7+2+7+2))=104KHz.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xiangjun Rong&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2024 06:33:28 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-07-25T06:33:28Z</dc:date>
    <item>
      <title>I2C configuration in LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1915299#M56514</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I'm currently working in the LPC 845 microcontroller in I2c. i have tried the calculation for the CLKDIV register with the formula&lt;/P&gt;&lt;P&gt;Baudrate= I2C frequency/(SCLHIGH+SCLLOW)&lt;/P&gt;&lt;P&gt;For example;&lt;/P&gt;&lt;P&gt;100 KHz=30Mhz/(SCLHIGH+SCLLOW)&lt;/P&gt;&lt;P&gt;which gives the&amp;nbsp;(SCLHIGH+SCLLOW)=300 &amp;amp; individual SCL will be 150&amp;nbsp;&lt;/P&gt;&lt;P&gt;when substituting with the SCL= (CLKDIV+1)*(MSTSCLHIGH+2)&lt;/P&gt;&lt;P&gt;where MSTSCLHIGH =1,;&lt;/P&gt;&lt;P&gt;when finding the CLKDIV, which gives the CLKDIV = 49.&lt;/P&gt;&lt;P&gt;I have compared and substituted with the calculation which derived SDK example it does not match up and couldn't get the exact value for CLKDIV when configuring with I2C while debugging for 100KHz the value will be 0x18.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How the calculation will be. Kindly explain it briefly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Dharsan K K&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 16:57:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1915299#M56514</guid>
      <dc:creator>DHARSAN</dc:creator>
      <dc:date>2024-07-23T16:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: I2C configuration in LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916799#M56516</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As the following screenshot,&lt;/P&gt;
&lt;P&gt;SCL rate = I2C function clock rate / (SCL high time + SCL low time) = I2C function clock rate / ((CLKDIV + 1) * (MSTSCLHIGH + 2+MSTSCLLOW + 2))).&lt;/P&gt;
&lt;P&gt;The CLKDIV is the value in I2C-&amp;gt;CLKDIV reg&lt;/P&gt;
&lt;P&gt;The MSTSCLHIGH is the value in MSTSCLHIGH bits in I2C-&amp;gt;MSTTIME reg&lt;/P&gt;
&lt;P&gt;The MSTSCLLOW is the value in&amp;nbsp;MSTSCLLOW bits in&amp;nbsp; I2C-&amp;gt;MSTTIME reg&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_1-1721878873790.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/290233i8C24D7FC6FB5C11A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1721878873790.png" alt="xiangjun_rong_1-1721878873790.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In table 369, The I2C function clock rate is 30mhz&lt;/P&gt;
&lt;P&gt;CLKDIV value is 14, MSTSCLHIGH bits is 0, MSTSCLLOW is 1.&lt;/P&gt;
&lt;P&gt;SCL rate = I2C function clock rate /((CLKDIV + 1) * (MSTSCLHIGH + 2+MSTSCLLOW + 2)))&lt;/P&gt;
&lt;P&gt;=30MHz/((14+1)*(0+2+1+2))=30MHz/(15*5)=400KHz&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 03:51:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916799#M56516</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-07-25T03:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: I2C configuration in LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916809#M56517</link>
      <description>The DIVVAL of CLKDIV value for 30MHz is 14 has only given for the 400 KHz frequency, when calculating for 100 KHz there is no DIVVAL mentioned then how the calculation will be?</description>
      <pubDate>Thu, 25 Jul 2024 04:13:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916809#M56517</guid>
      <dc:creator>DHARSAN</dc:creator>
      <dc:date>2024-07-25T04:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: I2C configuration in LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916815#M56518</link>
      <description>&lt;P&gt;Also while debugging the SDK example with the configuration of 400KHz(Clock=30MHz), we got the value for the registers&lt;/P&gt;&lt;P&gt;CLKDIV=0x03&lt;/P&gt;&lt;P&gt;MSTTIME=0x77&lt;/P&gt;&lt;P&gt;Kindly resolve or give a solution for the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 04:29:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916815#M56518</guid>
      <dc:creator>DHARSAN</dc:creator>
      <dc:date>2024-07-25T04:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: I2C configuration in LPC845</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916882#M56520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;With the configuration:&lt;/P&gt;
&lt;P&gt;case 1:&lt;/P&gt;
&lt;P&gt;30mHz I2C clock:&lt;/P&gt;
&lt;P&gt;CLKDIV=0x03&lt;/P&gt;
&lt;P&gt;MSTTIME=0x77&lt;/P&gt;
&lt;P&gt;The I2C baudrate is 30Mhz/((3+1)(7+2+7+2))=416Khz.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;case 2:&lt;/P&gt;
&lt;P&gt;If you want to get 100KHz I2C baud rate, you can select the parameter:&lt;/P&gt;
&lt;P&gt;CLKDIV=15,&lt;/P&gt;
&lt;P&gt;MSTTIME=0x77;&lt;/P&gt;
&lt;P&gt;The I2C baudrate is 30Mhz/((15+1)(7+2+7+2))=104KHz.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xiangjun Rong&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 06:33:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-configuration-in-LPC845/m-p/1916882#M56520</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-07-25T06:33:28Z</dc:date>
    </item>
  </channel>
</rss>

