<?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 K82 : I2C freertos driver , infinite timeout ? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890720#M52628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see I2C master freertos driver fsl_i2c_freertos.c has infinite time to wait end of transaction :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Wait for transfer to finish */&lt;BR /&gt; xSemaphoreTake(handle-&amp;gt;semaphore, portMAX_DELAY); // forever ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From other side HW timeout(s) for I2C peripheral is not set anywhere in driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could it possible to guide how-to set properly all HW timeouts for master I2C interface and&lt;/P&gt;&lt;P&gt;modify&amp;nbsp; (if need) i2c freertos driver for work properly with I2C peripheral when HW timeouts are configured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does exist any Application Note for configure I2C HW timeouts ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Apr 2019 12:54:01 GMT</pubDate>
    <dc:creator>EugeneHiihtaja</dc:creator>
    <dc:date>2019-04-24T12:54:01Z</dc:date>
    <item>
      <title>K82 : I2C freertos driver , infinite timeout ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890720#M52628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see I2C master freertos driver fsl_i2c_freertos.c has infinite time to wait end of transaction :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Wait for transfer to finish */&lt;BR /&gt; xSemaphoreTake(handle-&amp;gt;semaphore, portMAX_DELAY); // forever ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From other side HW timeout(s) for I2C peripheral is not set anywhere in driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could it possible to guide how-to set properly all HW timeouts for master I2C interface and&lt;/P&gt;&lt;P&gt;modify&amp;nbsp; (if need) i2c freertos driver for work properly with I2C peripheral when HW timeouts are configured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does exist any Application Note for configure I2C HW timeouts ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2019 12:54:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890720#M52628</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2019-04-24T12:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: K82 : I2C freertos driver , infinite timeout ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890721#M52629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eugene:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From hardware perspective, we need to configure below registers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2Cx_SMB[TCKSEL] is used to select the clock source of the time out counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70685i15C304CFB155BCAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70503i0A3A6D2F902F56A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70732i9A626517F943448E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if timeout is 30ms, TCKSEL=0, bus clock is 25M&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp; I2C0_SLTL = I2C_SLTL_SSLT(0xC7); &amp;nbsp; &amp;nbsp; &amp;nbsp; /* I2C0_SLTL: SSLT=0xC7 */&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp; I2C0_SLTH: SSLT=0x2D &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Set SCL low &lt;STRONG&gt;timeout&lt;/STRONG&gt; register low */&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp; I2C0_SLTH = I2C_SLTH_SSLT(0x2D); &amp;nbsp; &amp;nbsp; /* Set SCL low &lt;STRONG&gt;timeout&lt;/STRONG&gt; register high */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;For FreeRTOS driver perspective, I would suggest you try to configure the timeout value from portMAX_DELAY to a specified value. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;xSemaphoreTake(handle-&amp;gt;semaphore, portMAX_DELAY); // forever &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2019 15:25:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890721#M52629</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2019-04-29T15:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: K82 : I2C freertos driver , infinite timeout ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890722#M52630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I undestand right and those timeouts e.g SCL low and High are applicable to I2C master and slave interfaces ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can it be so that other changes are need to fsl_i2c driver ?&lt;/P&gt;&lt;P&gt;It is not visible any where if timeout enabled interrupts are enabled or if they occurs and analysed somewhere ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even I set relevant timeout values, I should enable detection of it and able to process relevant interrupts and clean those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you have somewhere new advanced fsl i2c&amp;nbsp; driver&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 08:28:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890722#M52630</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2019-05-02T08:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: K82 : I2C freertos driver , infinite timeout ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890723#M52631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you are right.&amp;nbsp;&amp;nbsp; those timeouts e.g SCL low and High are applicable to I2C master and slave interfaces.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Sorry currently no advanced fsl i2c driver for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 07:47:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-I2C-freertos-driver-infinite-timeout/m-p/890723#M52631</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2019-08-02T07:47:38Z</dc:date>
    </item>
  </channel>
</rss>

