<?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 Re: Defining the interruption source from I2C0_IRQHandler (KSDK) in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428256#M2407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Matheus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you doubt the interrupt is not the complete transfer interrupt , i think you can check the interrupt flag :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54887i200610CE431EA02B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check which interrupt status be set , if there are more than one , you can disable them except the transfer interrupt , then test .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps !&amp;nbsp; &lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Sep 2015 12:48:32 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2015-09-07T12:48:32Z</dc:date>
    <item>
      <title>Defining the interruption source from I2C0_IRQHandler (KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428253#M2404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The I2C0_IRQHandler, generated by kinetis SDK with KDS 3.0.0 and processor expert, can be triggered by differents sources from i2c module.&lt;/P&gt;&lt;P&gt;I want to know, how can I determine when the interrupt corresponds to a complete block write/read, using the I2C_DRV_MasterReceiveData and I2C_DRV_MasterSendData?&lt;/P&gt;&lt;P&gt;I don't want use pooling, e.g. with "I2C_DRV_MasterGetSendStatus".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2015 17:34:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428253#M2404</guid>
      <dc:creator>matheuspinto</dc:creator>
      <dc:date>2015-09-05T17:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the interruption source from I2C0_IRQHandler (KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428254#M2405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PInto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which chip do you use ?&lt;/P&gt;&lt;P&gt;There are I2C interrupt demo under KSDK , for k22 example :&lt;/P&gt;&lt;P&gt;\Freescale\KSDK_1.2.0\examples\frdmk22f\demo_apps\i2c_comm\master\kds &lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;\Freescale\KSDK_1.2.0\examples\frdmk22f\driver_examples\i2c\i2c_blocking\master\kds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when complete write or read, it will enter void I2C0_IRQHandler(void) , you can run the demo to debug .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;ALice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 03:58:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428254#M2405</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-09-06T03:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the interruption source from I2C0_IRQHandler (KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428255#M2406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the kl25z.&lt;/P&gt;&lt;P&gt;I made a test where a flag is set when entering in I2C0_IRQHandler(void).&lt;/P&gt;&lt;P&gt;Another function will pass, just when this flag is set.&lt;/P&gt;&lt;P&gt;To test, if the transfer was really finished, it is used this condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(I2C_DRV_MasterGetReceiveStatus(FSL_I2C_0, &amp;amp;bytesRemaining) == kStatus_I2C_Busy)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redLed_Write(0); // on the LED&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens is that the program enters in the eternal for(;;), setting the LED.&lt;/P&gt;&lt;P&gt;So I think that the I2C0_IRQHandler(void) is called for another reason beyond the block transfer complete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 14:23:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428255#M2406</guid>
      <dc:creator>matheuspinto</dc:creator>
      <dc:date>2015-09-06T14:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the interruption source from I2C0_IRQHandler (KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428256#M2407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Matheus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you doubt the interrupt is not the complete transfer interrupt , i think you can check the interrupt flag :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54887i200610CE431EA02B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check which interrupt status be set , if there are more than one , you can disable them except the transfer interrupt , then test .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps !&amp;nbsp; &lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 12:48:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428256#M2407</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-09-07T12:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the interruption source from I2C0_IRQHandler (KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428257#M2408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the ISR its called the I2C_HAL_GetStopFlag function that returns true if the STOPF bit in I2C_FLT register is set, indicating the presence of a stop bit!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ISR never enters inside the "else" below!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if(I2C_HAL_GetStopFlag(I2C0_BASE_PTR) != true)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; I2C_DRV_IRQHandler(FSL_I2C_0);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt; return;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; I2C_DRV_IRQHandler(FSL_I2C_0);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt; return;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 15:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428257#M2408</guid>
      <dc:creator>matheuspinto</dc:creator>
      <dc:date>2015-09-07T15:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the interruption source from I2C0_IRQHandler (KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428258#M2409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Matheus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The STOPF bit indicate the mcu enter stop mode , and whether there have stop signal on I2C bus .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the function of "I2C_DRV_IRQHandler()" is hardware interrupt , not execute it through software code to judgment .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 07:14:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428258#M2409</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-09-08T07:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the interruption source from I2C0_IRQHandler (KSDK)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428259#M2410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Sorry Alice, but I dont understand what you mean!&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;The ISR that I am using is the I2C0_IRQHandler, not &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I2C_DRV_IRQHandler.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Anyway, &lt;SPAN lang="en" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;I think I'm not being understood too.&lt;/SPAN&gt; My goal was a mm8451q accel driver using the KSDK. The communication with the accel (write/read his registers) is made with i2c protocol. For this, I create a high level driver for i2c that uses the KSDK i2c driver. My driver was made for projects with or without the FreeRTOS, using macros for this.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;The two most importants methods from my i2c driver are:&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; &lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;i2c_MasterWrite&lt;/STRONG&gt;( &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #7f0055;"&gt;const&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; * regAddr,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; regAddrSize,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #7f0055;"&gt;const&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; * data,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; dataSize,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;i2c_block_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; block);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;That function write a block of data in specific register of slave device. If using RTOS, the current task are blocked if block == i2cBLOCKED.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;The idea is the same for the function that reads from i2c:&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; &lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;i2c_MasterRead&lt;/STRONG&gt;( &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #7f0055;"&gt;const&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; * regAddr,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&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;&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; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; regAddrSize,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&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;&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; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; * data,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&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;&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; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; dataSize,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&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;&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;&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; &lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #005032;"&gt;i2c_block_t&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt; block);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;A issue occurs when I using the FreeRTOS. &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;When entering in the&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: Consolas; color: black;"&gt;i2c_MasterRead&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&gt; the current task (the only one from my test), take the bus acess &lt;SPAN lang="en" style="font-weight: inherit; font-style: inherit; font-size: 14.6667px; font-family: inherit;"&gt;through a&lt;/SPAN&gt; mutex&amp;nbsp; &lt;SPAN lang="en" style="font-weight: inherit; font-style: inherit; font-size: 14.6667px; font-family: inherit;"&gt;as shown in figure below, and receives bytes block&lt;/SPAN&gt; from i2c bus through &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: black; text-decoration: underline; background: #d3d3d3;"&gt;I2C_DRV_MasterReceiveData&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&gt; from KSDK. &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN lang="en"&gt;Soon after, the function is blocked by a semaphore , waiting for a signal indicating that all block have been received.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Sem título.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/57594i32DA42C22B592EC4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sem título.png" alt="Sem título.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;The i2c_TaskWaitBusTransaction corresponds to a macro:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&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/57458iDAA8ACF3D329D023/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN lang="en"&gt;Such signal must be indicated ​​by I2C &lt;SPAN style="color: #51626f; font-family: Calibri, sans-serif; font-size: 14.6667px;"&gt;ISR &lt;/SPAN&gt;, as shown in the figure below.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/57515iA1DA8581CAF16F69/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="en"&gt;However I was suspected that the interrupt was not triggered only when all the block was sent. So I created a conditional inside the i2c_MasterRead function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/57516i622E3D669AE0DFFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_8.png" alt="pastedImage_8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="en"&gt;The goal of this conditional is to indicate through the KSDK &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;API &lt;/SPAN&gt;if all bytes were &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;really &lt;/SPAN&gt;sent. However, during debugging, my program enters inside the conditional and the actual state of i2c module is Indicated in the figure below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="en"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_9.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/57541iF0C53BF38F7FBC85/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_9.png" alt="pastedImage_9.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Therefore, the ISR is called even when the bus is busy, ie &lt;SPAN lang="en"&gt;the block was not sent yet!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="en"&gt;My project is attached!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN lang="en"&gt;Solutions???&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:17:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Defining-the-interruption-source-from-I2C0-IRQHandler-KSDK/m-p/428259#M2410</guid>
      <dc:creator>matheuspinto</dc:creator>
      <dc:date>2015-09-24T19:17:08Z</dc:date>
    </item>
  </channel>
</rss>

