<?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 Software Development KitのトピックRe: KL02 I2C communication with DAC AD5306</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL02-I2C-communication-with-DAC-AD5306/m-p/511985#M5282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andres,&lt;/P&gt;&lt;P&gt;After had a brief look through your statement, I haven't find any wrong with your code until now.&lt;/P&gt;&lt;P&gt;And I'd like to suggest that you can sample the I2C communcating wave by using the logic analyzer or the oscilloscope,&lt;/P&gt;&lt;P&gt;then compare the waves with the AD5306 operation sequences which are illustrated in the AD5306's datasheet.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2016 03:38:34 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2016-05-11T03:38:34Z</dc:date>
    <item>
      <title>KL02 I2C communication with DAC AD5306</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL02-I2C-communication-with-DAC-AD5306/m-p/511984#M5281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, I hope you can help me with this problem, I have been with this issue during several days and the problem is not solved yet.&lt;/P&gt;&lt;P&gt;I have the FRDM-KL02 board connected with a DAC converter (AD5306) via I2C. I have &lt;STRONG&gt;configured the I2C1&lt;/STRONG&gt; with ports A8 and A9 as SCL and SDA:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;#define BOARD_I2C_GPIO_SCL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO_MAKE_PIN(GPIOA_IDX, 8)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;#define BOARD_I2C_GPIO_SDA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO_MAKE_PIN(GPIOA_IDX, 9)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;#define BOARD_I2C_INSTANCE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The KL02 acts as Master and the DAC as slave. The first communication byte has to be the slave address (7 bits) followed by the typical R/W bit. After that, another 3 bytes has to be sent.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to use the "I2C_DRV_MasterSendDataBlocking" but it does not work fine.&lt;/P&gt;&lt;P&gt;I have debugged the code and when it tries to send the addres byte via I2C (inside the function "I2C_DRV_SendAddress"), the slave address value is not transfered to the I2C1_D register specifically when next function is called:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;I2C_HAL_WriteByte(I2C1_BASE_PTR, addrBuff[0]); &lt;/STRONG&gt;// addrBuff[0] contains the slave address with the R/W bit = 1&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; padding-left: 30px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have checked all the I2C1 registers, and they are correct. The main sequence for the I2C communication in my project is the next one:&lt;/P&gt;&lt;P&gt;// Initialize i2c master&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OSA_Init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2C_DRV_MasterInit(BOARD_I2C_INSTANCE, &amp;amp;master);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //i2c_master_state_t master;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**********************************************/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Master sends only data to slave (4 bytes: 1 Slave Addres + 1 pointer byte + 2 data bytes)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; txBuff[0]=0x01U;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; txBuff[1]=0x3FU;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; txBuff[2]=0xFFU;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Start transfer with buffer size is 1 byte&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2C_DRV_MasterSendDataBlockingAD5306(BOARD_I2C_INSTANCE, &amp;amp;device, NULL, 0, (const uint8_t*)txBuff, sizeof(txBuff), 1000);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea of what is happening? Could you suggest me any other way to do it correctly?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance. Waiting your suggestions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 11:55:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL02-I2C-communication-with-DAC-AD5306/m-p/511984#M5281</guid>
      <dc:creator>albt</dc:creator>
      <dc:date>2016-05-10T11:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: KL02 I2C communication with DAC AD5306</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL02-I2C-communication-with-DAC-AD5306/m-p/511985#M5282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andres,&lt;/P&gt;&lt;P&gt;After had a brief look through your statement, I haven't find any wrong with your code until now.&lt;/P&gt;&lt;P&gt;And I'd like to suggest that you can sample the I2C communcating wave by using the logic analyzer or the oscilloscope,&lt;/P&gt;&lt;P&gt;then compare the waves with the AD5306 operation sequences which are illustrated in the AD5306's datasheet.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 03:38:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL02-I2C-communication-with-DAC-AD5306/m-p/511985#M5282</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-05-11T03:38:34Z</dc:date>
    </item>
  </channel>
</rss>

