<?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: LPC824 / LPC 812 SDK I2c  (fsl_i2c.c )  device driver fault / solution device adress selection</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-LPC-812-SDK-I2c-fsl-i2c-c-device-driver-fault-solution/m-p/1420869#M48068</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I can not find out the data sheet of PCA5532, but I found out PCA9532 from the link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com.cn/docs/en/data-sheet/PCA9532.pdf" target="_blank"&gt;https://www.nxp.com.cn/docs/en/data-sheet/PCA9532.pdf&lt;/A&gt;&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_1-1646103465523.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/172046i09639FEAC62A1C2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1646103465523.png" alt="xiangjun_rong_1-1646103465523.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the A2/A1/A0 are 000 in binary, you can set the address as 0xC0&amp;gt;&amp;gt;1 or 0x60 when you call the I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direction)&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2022 03:00:57 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2022-03-01T03:00:57Z</dc:date>
    <item>
      <title>LPC824 / LPC 812 SDK I2c  (fsl_i2c.c )  device driver fault / solution device adress selection</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-LPC-812-SDK-I2c-fsl-i2c-c-device-driver-fault-solution/m-p/1420749#M48063</link>
      <description>&lt;P&gt;The fsl_i2c.c drive file does not operate with i2c chips with base device adresses above &amp;lt; 128&lt;/P&gt;&lt;P&gt;The &lt;FONT color="#FF0000"&gt;original code&lt;/FONT&gt; shifts out the 8 bit of the base adress. eg. If you wanted to adress a PCA5532 with base adress 0xc0 it will pass the wrong adress (0x40)&lt;/P&gt;&lt;P&gt;with some additional lines it wil works ok with al adresses.&lt;/P&gt;&lt;P&gt;status_t I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direction)&lt;BR /&gt;{&lt;BR /&gt;if (I2C_PendingStatusWait(base) == (uint32_t)kStatus_I2C_Timeout)&lt;BR /&gt;{&lt;BR /&gt;return kStatus_I2C_Timeout;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Write Address and RW bit to data register */&lt;BR /&gt;&lt;FONT color="#339966"&gt;if (address &amp;lt; 127){&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;base-&amp;gt;MSTDAT = ((uint32_t)address &amp;lt;&amp;lt; 1) | ((uint32_t)direction &amp;amp; 1u);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;else{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;base-&amp;gt;MSTDAT = ((uint32_t)address ) | ((uint32_t)direction &amp;amp; 1u);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/* Start the transfer */&lt;BR /&gt;base-&amp;gt;MSTCTL = I2C_MSTCTL_MSTSTART_MASK;&lt;/P&gt;&lt;P&gt;return kStatus_Success;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 20:38:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-LPC-812-SDK-I2c-fsl-i2c-c-device-driver-fault-solution/m-p/1420749#M48063</guid>
      <dc:creator>harmlok</dc:creator>
      <dc:date>2022-02-28T20:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC824 / LPC 812 SDK I2c  (fsl_i2c.c )  device driver fault / solution device adress selection</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-LPC-812-SDK-I2c-fsl-i2c-c-device-driver-fault-solution/m-p/1420869#M48068</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I can not find out the data sheet of PCA5532, but I found out PCA9532 from the link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com.cn/docs/en/data-sheet/PCA9532.pdf" target="_blank"&gt;https://www.nxp.com.cn/docs/en/data-sheet/PCA9532.pdf&lt;/A&gt;&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_1-1646103465523.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/172046i09639FEAC62A1C2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1646103465523.png" alt="xiangjun_rong_1-1646103465523.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the A2/A1/A0 are 000 in binary, you can set the address as 0xC0&amp;gt;&amp;gt;1 or 0x60 when you call the I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direction)&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 03:00:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC824-LPC-812-SDK-I2c-fsl-i2c-c-device-driver-fault-solution/m-p/1420869#M48068</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-01T03:00:57Z</dc:date>
    </item>
  </channel>
</rss>

