<?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>LPC Microcontrollers中的主题 Re: I2c clock frequency issue</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1178389#M42782</link>
    <description>&lt;P&gt;Hi, Kumar,&lt;/P&gt;
&lt;P&gt;This code route the CLKOUT_0 signal to PIO0_19, but I do not test it, pls have a try.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;#include "fsl_SWM_connections.h"&lt;/P&gt;
&lt;P&gt;#include "fsl_swm.h"&lt;/P&gt;
&lt;P&gt;void ClkoutPinAssignment(void);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;void ClkoutPinAssignment(void)&lt;BR /&gt;{&lt;BR /&gt;//enable SWM clock&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;BR /&gt;//output CLKOUT signal to PIO19&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0,kSWM_CLKOUT,kSWM_PortPin_P0_19);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2020 02:14:12 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2020-11-05T02:14:12Z</dc:date>
    <item>
      <title>I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176381#M42757</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using I2c0 of LPC824 max board in that I configure i2c speed as 400kHz but got&amp;nbsp; 330 kHz only. For 100khz it is coming correct approximately 99khz. can anybody suggest what need to do.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Nov 2020 05:34:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176381#M42757</guid>
      <dc:creator>divyanshu_kumar</dc:creator>
      <dc:date>2020-11-02T05:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176562#M42762</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Your&amp;nbsp; colleague said that you use the internal clock source, can you tell us the value of MAINCLKSEL reg? it determines the clock source of the system clock and IIC.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1604310706727.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128824i333D9B6DBEB53760/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1604310706727.png" alt="xiangjun_rong_0-1604310706727.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 09:53:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176562#M42762</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-11-02T09:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176588#M42763</link>
      <description>&lt;P&gt;Hi Rong,&lt;/P&gt;&lt;P&gt;I used Internal IRC oscillator.&lt;/P&gt;&lt;P&gt;Please find the below code of initialization of clock.&lt;/P&gt;&lt;P&gt;when we increased the frequency to 440khz than we are getting&amp;nbsp; 400khz.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;void BOARD_BootClockIRC12M(void)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/*!&amp;lt; Set up the clock sources */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/*!&amp;lt; Set up IRC */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;POWER_DisablePD(kPDRUNCFG_PD_IRC_OUT); /*!&amp;lt; Ensure IRC OUT is on */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;POWER_DisablePD(kPDRUNCFG_PD_IRC); /*!&amp;lt; Ensure IRC is on */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CLOCK_Select(kSYSPLL_From_Irc); /*!&amp;lt; set IRC to pll select */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;clock_sys_pll_t config;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;config.src=kCLOCK_SysPllSrcIrc; /*!&amp;lt; set pll src */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;config.targetFreq = 12000000U; /*!&amp;lt; set pll target freq */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CLOCK_InitSystemPll(&amp;amp;config); /*!&amp;lt; set parameters */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CLOCK_SetMainClkSrc(kCLOCK_MainClkSrcIrc); /*!&amp;lt; select irc for main clock */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CLOCK_Select(kCLKOUT_From_Irc); /*!&amp;lt; select IRC for CLKOUT */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CLOCK_SetCoreSysClkDiv(1U);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/*!&amp;lt; Set SystemCoreClock variable. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SystemCoreClock = BOARD_BOOTCLOCKIRC12M_CORE_CLOCK;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 10:17:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176588#M42763</guid>
      <dc:creator>divyanshu_kumar</dc:creator>
      <dc:date>2020-11-02T10:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176895#M42768</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;From your code, you output the 12MHz IRC clock to the CLKO pin, it is okay, with the scope, you can test the IRC clock frequency. BTW, you can output the main clock to the CLKO pin and test it's frequency. The I2C clock frequency is main_clock/[SYSAHBCLKDIV*I2C_CLKDIV*(MSTSCLLOW+MSTSCLHIGH in MSTTIME reg)].&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1604370953429.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128879iB5631A9173F9D2F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1604370953429.png" alt="xiangjun_rong_0-1604370953429.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 02:40:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1176895#M42768</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-11-03T02:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1177121#M42771</link>
      <description>&lt;P&gt;Hi Rong,&lt;/P&gt;&lt;P&gt;I used pio24 pin for clkout pin, i am not getting any output. Do you have any example code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 08:35:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1177121#M42771</guid>
      <dc:creator>divyanshu_kumar</dc:creator>
      <dc:date>2020-11-03T08:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1177785#M42778</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please share the sample code to get internal frequency on clkout pin. I configured po24 pin in swm setting but didn't get any output.&lt;/P&gt;&lt;P&gt;please provide the solution as soon as possible consider it as urgent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 08:43:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1177785#M42778</guid>
      <dc:creator>divyanshu_kumar</dc:creator>
      <dc:date>2020-11-04T08:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1178389#M42782</link>
      <description>&lt;P&gt;Hi, Kumar,&lt;/P&gt;
&lt;P&gt;This code route the CLKOUT_0 signal to PIO0_19, but I do not test it, pls have a try.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;#include "fsl_SWM_connections.h"&lt;/P&gt;
&lt;P&gt;#include "fsl_swm.h"&lt;/P&gt;
&lt;P&gt;void ClkoutPinAssignment(void);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;void ClkoutPinAssignment(void)&lt;BR /&gt;{&lt;BR /&gt;//enable SWM clock&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;BR /&gt;//output CLKOUT signal to PIO19&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0,kSWM_CLKOUT,kSWM_PortPin_P0_19);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 02:14:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1178389#M42782</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-11-05T02:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: I2c clock frequency issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1179161#M42796</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have tested the code on my LPC824 board, with which the CLKOUT outputs to PIO0_19 with main clock source. It works fine.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;void ClkoutPinAssignment(void)&lt;BR /&gt;{&lt;BR /&gt;//enable SWM clock&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Swm);&lt;BR /&gt;//output CLKOUT signal to PIO19&lt;BR /&gt;SWM_SetMovablePinSelect(SWM0,kSWM_CLKOUT,kSWM_PortPin_P0_19);&lt;BR /&gt;SYSCON-&amp;gt;CLKOUTUEN&amp;amp;=~(0x01);&lt;BR /&gt;SYSCON-&amp;gt;CLKOUTSEL=0x03;&lt;BR /&gt;SYSCON-&amp;gt;CLKOUTDIV=0xFF;&lt;BR /&gt;SYSCON-&amp;gt;CLKOUTUEN|=0x01;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 05:29:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2c-clock-frequency-issue/m-p/1179161#M42796</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-11-06T05:29:53Z</dc:date>
    </item>
  </channel>
</rss>

