<?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: Can't have SDA completely low at ACK  on HAL I2C ,MKV31</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470410#M3764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved,for real, this time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it was absolutely my fault&lt;/STRONG&gt;,a wrong assumption&lt;/P&gt;&lt;P&gt;there is a bit that i never used and not present in other Freescale uControllers i worked with (KL family), and i was not aware of its existence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is the bit &lt;STRONG&gt;ODE&lt;/STRONG&gt;(OpenDrainEnable) in PCR pin configuration register ,missing in the KLfamily,i assumed erroneously that pin configuration was the same after a rapid glance,and that once choosed an alternate I2C function for the pin ,everything would have been in I2C style&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And is clearly showed:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Open drain configuration is valid in all digital pin muxing modes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At my weak defense i could say that no mention to this bit in the whole I2C chapter&lt;/P&gt;&lt;P&gt;and the I2C initialization component does not affects this bit(am i right?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i could say &lt;/P&gt;&lt;P&gt;not a bug in the uC,compliant to its reference manual&lt;/P&gt;&lt;P&gt;maybe a lack in library,probably inherited from uC with less features,i dare to signal to the support team&lt;/P&gt;&lt;P&gt;As i told it's mainly my fault&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again for your help ,Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jan 2016 16:33:32 GMT</pubDate>
    <dc:creator>diegocolombo</dc:creator>
    <dc:date>2016-01-08T16:33:32Z</dc:date>
    <item>
      <title>Can't have SDA completely low at ACK  on HAL I2C ,MKV31</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470406#M3760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all the people in the community&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have an intermediate level when i check ACK bit in an I2C communication ,with uC sending the correct address slave,&lt;/P&gt;&lt;P&gt;It looks like&amp;nbsp; after the 8th bit,the master uC , instead of releasing the SDA line, holds it at high level,in conflict with the acknowledging peripheral&lt;/P&gt;&lt;P&gt;low level , :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="124735_124735.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120939iDEF89792F150E92E/image-size/large?v=v2&amp;amp;px=999" role="button" title="124735_124735.jpg" alt="124735_124735.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20160106_174356.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52038i2984EFFAE2E5634A/image-size/large?v=v2&amp;amp;px=999" role="button" title="20160106_174356.jpg" alt="20160106_174356.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Notice that if i use the same pins in GPIO bitbang ,everything works as expected.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I decided to use a MKV31F256VL uController in a prototype needing versatile PWM and good clock speed&lt;/P&gt;&lt;P&gt;I had to communicate via I2C&amp;nbsp; with a RTCC.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the same thing in minutes in a previous version using a baseline uC,a MKL15 ,using&amp;nbsp; Code Warrior 10.5,&lt;/P&gt;&lt;P&gt;The PE component for I2C gave me easily the necessary methods.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this uC&amp;nbsp; i had to use KDS._12C_hal&lt;/P&gt;&lt;P&gt;The GenericI2C component seems not completely implemented for this device.So&amp;nbsp; i tried with a lower level component:&lt;STRONG&gt;fsl_i2C_hal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I used it in a non -OSA project,in a very simple way,not very differently than directly accessing to registers,with no interrupts or semaphores.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp; I2C_HAL_SetDirMode(I2C0_BASE_PTR,1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp; I2C_HAL_SetAddress7bit(I2C0_BASE_PTR,0x6E);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp; I2C_HAL_SetBaudRate(I2C0_BASE_PTR,60000000,300,0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp; I2C_HAL_Enable(I2C0_BASE_PTR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: #3334ca;"&gt;while(1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Delay_ms(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2C_HAL_SendStart(I2C0_BASE_PTR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2C_HAL_WriteByte(I2C0_BASE_PTR,0xAE);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Delay_ms(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The pullup resistors are both 10K.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 19:22:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470406#M3760</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2016-01-06T19:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can't have SDA completely low at ACK  on HAL I2C ,MKV31</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470407#M3761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved,in some way:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I assumed(and many times this could be misleading if left undiscussed) that the 7-bit address in A1 register was non important,because the first byte i send after start will result as address to my I2C slave,i thought that A1 value was just the uC address ,when uCis in slave mode..&lt;/P&gt;&lt;P&gt;Actually it looks that the value in A1 should be related to the byte sent with I2C_HAL_WriteByte:&lt;/P&gt;&lt;P&gt;If the address of the slave device is 0x57(in bits 7:1)&amp;nbsp;&amp;nbsp; the first data to send using I2C_HAL_WriteByte has to be 0x57 *2=0xAE.&lt;/P&gt;&lt;P&gt;If there is no match the uC marks NACK on the 9th bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shurely, for someone all this sounds natural,but in my primitive acknowledge of I2C,I assumed that the master always puts SDa in Hi-Z at the 9th bit,leaving the slave free to decide wich level put on SDA line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone explain me how it works in this and other cases?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 08:51:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470407#M3761</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2016-01-07T08:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can't have SDA completely low at ACK  on HAL I2C ,MKV31</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470408#M3762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diego,&lt;/P&gt;&lt;P&gt;I'm not an but have some information that might help you.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/video/essentials-of-mqx-rtos-application-development-session-11-ic2-driver:MQX-RTOS-S11" title="http://www.nxp.com/video/essentials-of-mqx-rtos-application-development-session-11-ic2-driver:MQX-RTOS-S11"&gt;MQX-RTOS-Session 11: IC2 Driver|NXP&lt;/A&gt;&amp;nbsp;&amp;nbsp; Good video review of I2C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;High overview of I2C: &lt;A href="http://www.mcc-us.com/I2CBusTechnicalOverview.pdf" title="http://www.mcc-us.com/I2CBusTechnicalOverview.pdf"&gt;http://www.mcc-us.com/I2CBusTechnicalOverview.pdf&amp;nbsp; &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deeper dive into the I2C protocol: &lt;A href="http://www.mcc-us.com/i2cHowToUseIt1995.pdf" title="http://www.mcc-us.com/i2cHowToUseIt1995.pdf"&gt;http://www.mcc-us.com/i2cHowToUseIt1995.pdf&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 15:47:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470408#M3762</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-01-07T15:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't have SDA completely low at ACK  on HAL I2C ,MKV31</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470409#M3763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanky ou David..&lt;/P&gt;&lt;P&gt;i say solved but the problem was only moved to the next bytes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the device,a well kwn 2402 eeprom,and the problem remains.and i think it is something&amp;nbsp; electrical,not exactly I2C.&lt;/P&gt;&lt;P&gt;In I2C a master,or slave can hold down the SDA or release it to the pullups.&lt;/P&gt;&lt;P&gt;Here there is a kind of electric conflict,it looks the device want to acknowledge,and the master don't release the line.It has no sense to me.&lt;/P&gt;&lt;P&gt;In this moment i have no time at all to go deeper in I2C,that is needed for a secondary feature.&lt;/P&gt;&lt;P&gt;Despite the matter is interesting i have to solve,I would be glad to use quickly some high level component,but it looks that there is no component that can be used easily in a non RTOS project.&lt;/P&gt;&lt;P&gt;I'm here from 7 in the morning,with some rest ,now is 1:22 am,..19 hours more or less&lt;/P&gt;&lt;P&gt;I had to solve or i will drop this project because day are passing by,and this time is not paid at all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 00:26:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470409#M3763</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2016-01-08T00:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can't have SDA completely low at ACK  on HAL I2C ,MKV31</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470410#M3764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved,for real, this time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it was absolutely my fault&lt;/STRONG&gt;,a wrong assumption&lt;/P&gt;&lt;P&gt;there is a bit that i never used and not present in other Freescale uControllers i worked with (KL family), and i was not aware of its existence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is the bit &lt;STRONG&gt;ODE&lt;/STRONG&gt;(OpenDrainEnable) in PCR pin configuration register ,missing in the KLfamily,i assumed erroneously that pin configuration was the same after a rapid glance,and that once choosed an alternate I2C function for the pin ,everything would have been in I2C style&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And is clearly showed:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Open drain configuration is valid in all digital pin muxing modes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At my weak defense i could say that no mention to this bit in the whole I2C chapter&lt;/P&gt;&lt;P&gt;and the I2C initialization component does not affects this bit(am i right?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i could say &lt;/P&gt;&lt;P&gt;not a bug in the uC,compliant to its reference manual&lt;/P&gt;&lt;P&gt;maybe a lack in library,probably inherited from uC with less features,i dare to signal to the support team&lt;/P&gt;&lt;P&gt;As i told it's mainly my fault&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again for your help ,Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 16:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Can-t-have-SDA-completely-low-at-ACK-on-HAL-I2C-MKV31/m-p/470410#M3764</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2016-01-08T16:33:32Z</dc:date>
    </item>
  </channel>
</rss>

