<?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 LPC845 Brk - I2C example in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1588832#M51412</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I want to try the I2C of the LPC845 BRK following what reported in the user manual&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_0-1674818545971.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208551iD494F13BD8181AA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_0-1674818545971.png" alt="tomato_0-1674818545971.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the initialization function of the I2C0 in the LPC845brk&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_1-1674818861357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208553iDE05CEAF0A7AC38D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_1-1674818861357.png" alt="tomato_1-1674818861357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And this is the send data function&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_2-1674818959822.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208554i0D11E3AFB3AC74FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_2-1674818959822.png" alt="tomato_2-1674818959822.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried to launch a program with these two function called but I am doing something wrong.&lt;/P&gt;&lt;P&gt;While debugging the code is stuck here&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_6-1674819642284.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208558i385FE977B02067DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_6-1674819642284.png" alt="tomato_6-1674819642284.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the i2c0 registers tell that the i2c is with communication in progress but i tried to see the SCL and SDA lines with the oscilloscopes and I do not see anything passing (always at 3v3). The MSTDAT register has the correct devaddr that I am passing&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_4-1674819347568.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208556i51E7E3DB69B21510/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_4-1674819347568.png" alt="tomato_4-1674819347568.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you tell me what I am doing wrongly?&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 11:41:21 GMT</pubDate>
    <dc:creator>tomato</dc:creator>
    <dc:date>2023-01-27T11:41:21Z</dc:date>
    <item>
      <title>LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1588832#M51412</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I want to try the I2C of the LPC845 BRK following what reported in the user manual&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_0-1674818545971.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208551iD494F13BD8181AA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_0-1674818545971.png" alt="tomato_0-1674818545971.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the initialization function of the I2C0 in the LPC845brk&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_1-1674818861357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208553iDE05CEAF0A7AC38D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_1-1674818861357.png" alt="tomato_1-1674818861357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And this is the send data function&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_2-1674818959822.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208554i0D11E3AFB3AC74FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_2-1674818959822.png" alt="tomato_2-1674818959822.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried to launch a program with these two function called but I am doing something wrong.&lt;/P&gt;&lt;P&gt;While debugging the code is stuck here&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_6-1674819642284.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208558i385FE977B02067DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_6-1674819642284.png" alt="tomato_6-1674819642284.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the i2c0 registers tell that the i2c is with communication in progress but i tried to see the SCL and SDA lines with the oscilloscopes and I do not see anything passing (always at 3v3). The MSTDAT register has the correct devaddr that I am passing&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_4-1674819347568.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/208556i51E7E3DB69B21510/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_4-1674819347568.png" alt="tomato_4-1674819347568.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you tell me what I am doing wrongly?&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 11:41:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1588832#M51412</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-01-27T11:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1589103#M51429</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is your slave configured? Are you using another board for the slave or something else?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;VaneB&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 22:17:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1589103#M51429</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-01-27T22:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1589365#M51434</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp; I'm having the same problem, with the only difference that I don't wait in a while loop, but enabled an interruption. I'm trying to do a loopback to the same board only to make it work.&lt;/P&gt;&lt;P&gt;If you want I can share my code with you so maybe both codes end up working right. I leave you my phone so you can text me on whatsapp to communicate more easily, and if we get to a solution then post it here.&lt;/P&gt;&lt;P&gt;+54 11 3588-0405&lt;/P&gt;&lt;P&gt;Sorry if I wrote something wrong, English is not my mother tongue.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 00:24:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1589365#M51434</guid>
      <dc:creator>luca_rimondini</dc:creator>
      <dc:date>2023-01-30T00:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1589879#M51438</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The slave is an IC (with I2C interface (the adress is correct)) placed&amp;nbsp;on a breadboard&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 15:17:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1589879#M51438</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-01-30T15:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1594198#M51538</link>
      <description>&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt; can you help me?</description>
      <pubDate>Mon, 06 Feb 2023 20:12:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1594198#M51538</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-06T20:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1594201#M51539</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/211855"&gt;@luca_rimondini&lt;/a&gt; did you solve your problem?</description>
      <pubDate>Mon, 06 Feb 2023 20:13:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1594201#M51539</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-06T20:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595035#M51551</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologize for the late reply.&lt;BR /&gt;Could you help me with an oscilloscope image showing the SDA and SCL? It seems that your program is waiting for the ACK.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 21:11:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595035#M51551</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-07T21:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595039#M51553</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;thanks for the reply&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;Actually the SDA and SCL lines are always high at 3v3. It seems that the communication does not start. As you said the program is waiting for the ACK but probing the SDA and SCL with an oscilloscopes I do not see even the address being sent by the lpc845.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;Do you think the i2c initialization is correct?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 21:36:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595039#M51553</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-07T21:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595078#M51554</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure you have the following to configure the I2C:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Provide main_clk as function clock to I2C0&lt;/LI&gt;
&lt;LI&gt;Enable bus clocks to I2C0 and SWM&lt;/LI&gt;
&lt;LI&gt;Configure the SWM&lt;/LI&gt;
&lt;LI&gt;Give I2C0 a reset&lt;/LI&gt;
&lt;LI&gt;Configure the I2C0 clock divider&lt;/LI&gt;
&lt;LI&gt;Configure the I2C0 CFG register&lt;/LI&gt;
&lt;LI&gt;Enable the I2C0 slave pending interrupt&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 07 Feb 2023 23:40:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595078#M51554</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-07T23:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595567#M51563</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp; I think I have made almost everything you mentioned below (you can check it in my first post)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Provide main_clk as function clock to I2C0&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;SYSCON-&amp;gt;FCLKSEL[5]=0x0; // i2c clock selection: main clock&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Enable bus clocks to I2C0 and SWM&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;SYSCON-&amp;gt;SYSAHBCLKCTRL0|=(1&amp;lt;&amp;lt;5); /* enable clock to I2C0 */&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configure the SWM&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;SYSCON-&amp;gt;SYSAHBCLKCTRL0|=(1&amp;lt;&amp;lt;7); // Enable SWM clock&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SWM0-&amp;gt;PINENABLE0&amp;amp;=~(1&amp;lt;&amp;lt;12); /* connect I2C0_SDA to PIO0_11 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SWM0-&amp;gt;PINENABLE0&amp;amp;=~(1&amp;lt;&amp;lt;13); /* connect I2C0_SCL to PIO0_10 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SYSCON-&amp;gt;SYSAHBCLKCTRL0&amp;amp;=~(1&amp;lt;&amp;lt;7); /* disable clock to SWM */&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Give I2C0 a reset&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;SYSCON-&amp;gt;PRESETCTRL0&amp;amp;=~(1&amp;lt;&amp;lt;5);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SYSCON-&amp;gt;PRESETCTRL0|=(1&amp;lt;&amp;lt;5); /* reset I2C0 */&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configure the I2C0 clock divider&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;I2C0-&amp;gt;CLKDIV=500;&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configure the I2C0 CFG register&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;I2C0-&amp;gt;CFG=(1&amp;lt;&amp;lt;0); /* master mode */&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Enable the I2C0 slave pending interrupt&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am not sure about this. Why do I need a slave pending interrupt? I would like to do it in polling mode: when the MSTpending bit is 1 I write to the MSTDAT register.&lt;/P&gt;&lt;P&gt;This is the basic function that I would like to call in my main()&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void i2c0_send_data(uint8_t devaddr,uint8_t value){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;I2C0-&amp;gt;MSTDAT=(devaddr&amp;lt;&amp;lt;1); // send address with R/W bit =0&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;I2C0-&amp;gt;MSTCTL|=(1&amp;lt;&amp;lt;1); // send start&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;while(!(I2C0-&amp;gt;STAT &amp;amp; 1)); /* wait for i2c0 idle or pending*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;I2C0-&amp;gt;MSTDAT= value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;I2C0-&amp;gt;MSTCTL=(1&amp;lt;&amp;lt;0); // send continue&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;while(!(I2C0-&amp;gt;STAT &amp;amp; 1)); /* wait for i2c0 idle or pending*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;I2C0-&amp;gt;MSTCTL|=(1&amp;lt;&amp;lt;2); // send stop&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;As I said before what I do not see working is this highlighted&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_0-1675847110317.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/210082iE7EEC25BA88BD427/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_0-1675847110317.png" alt="tomato_0-1675847110317.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;At first, I doublechecked that the connections are good and probed the lines directly at the lpc pins but the oscilloscope shows that the i2c lines are always high.&lt;/P&gt;&lt;P&gt;Therefore I tried to do something more direct like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;while(1){&lt;/P&gt;&lt;P&gt;I2C0-&amp;gt;MSTDAT=(14&amp;lt;&amp;lt;1); // send address with R/W bit =0&lt;BR /&gt;I2C0-&amp;gt;MSTCTL|=(1&amp;lt;&amp;lt;1); // send start&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I keep seeing the SCL and SDA lines stucked at 3v3 eventhough the start bit is set.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_0-1675857698544.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/210123i6620002C14F4A8C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_0-1675857698544.png" alt="tomato_0-1675857698544.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore I tried to unplug and plug again the SDA pull-up external 2k2 resistor (i am using the LPC845brk on a breadboard) while the while loop was running and the SCL and SDA lines started sending the address. Indeed what I did was to force a start condition. So in my opinion there should be something that hinders having the start condition of the i2c (lpc does not put sda low) but I am not able to figure out what.&lt;/P&gt;&lt;P&gt;Do you have any idea that can help me?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 12:05:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595567#M51563</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-08T12:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595977#M51567</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest to take a look at the I2C example included on &lt;A href="https://www.nxp.com/webapp/Download?colCode=LPC845-EX-CODE-MCUXPRESSO" target="_blank" rel="noopener"&gt;LPC845 Example Code Bundle MCUXpresso&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 21:10:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595977#M51567</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-08T21:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595987#M51569</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you tell me if i am doing something wrong? In my opinion I am following the steps reported in the manual but there should be something wrong. Do you agree?&lt;/P&gt;&lt;P&gt;However I looked at i2c_masterslave_main.c and it basically&amp;nbsp; does what I am currently doing&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 21:58:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1595987#M51569</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-08T21:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1596012#M51571</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try that the I2C_masterslave works for you?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 23:11:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1596012#M51571</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-08T23:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1596837#M51586</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not yet. The example you mentioned has a slightly different approach and it would need to be adapted... why can't we discuss about the code I posted? From your experience can't you tell me if I am doing everything in the reight way?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 20:50:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1596837#M51586</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-09T20:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1596849#M51587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When testing the example code and that it works, we ensure that there are no problems whit the HW.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 21:29:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1596849#M51587</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-09T21:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1597302#M51596</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you guide me to the installation of the core bundle? Can you give me a list of the steps that I have to follow in order to test the I2C corresctly?&lt;/P&gt;&lt;P&gt;I want to do it correctly 100% since you want to be sure that the HW is working&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 11:58:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1597302#M51596</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-10T11:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1597570#M51601</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/210324"&gt;@tomato&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached to the example you can find the README file describing the intended purpose, functional description, external connections, program flow and how to run the code.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 19:27:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1597570#M51601</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-10T19:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1598112#M51621</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the attached code bundle&lt;/P&gt;&lt;P&gt;Can you tell me how to import the code bundle in the MCUxpresso?&lt;/P&gt;&lt;P&gt;I am having this issue maybe related to the compiler or to how I imported the project in my folder&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tomato_0-1676284572991.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/210646iAD6C9A6790B0AAD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tomato_0-1676284572991.png" alt="tomato_0-1676284572991.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After that what shall I do to use test the I2C? I have seen that the I2C folder misses some files that are in the common folder&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 10:38:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1598112#M51621</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-13T10:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1601312#M51671</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;can you help me to use the code bundles and test the I2C?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 20:00:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1601312#M51671</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-17T20:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 Brk - I2C example</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1604733#M51707</link>
      <description>&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt; can you take a look at the post below?</description>
      <pubDate>Thu, 23 Feb 2023 17:07:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-Brk-I2C-example/m-p/1604733#M51707</guid>
      <dc:creator>tomato</dc:creator>
      <dc:date>2023-02-23T17:07:55Z</dc:date>
    </item>
  </channel>
</rss>

