<?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: I2C Master Driver Hanging on Kinetis K22.</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367217#M689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this is a better question to ask since these functions are included in the KSDK files in my includes already. I seem to have issues with include files not showing up when I compile, and I assume this has something to do with my linker or include settings, because with some things, simply declaring #include "X" or "include &amp;lt;X&amp;gt; leads to errors. Is there a common method to fix this, or have these files more easily recognized? I attribute this to lack of understanding with Eclipse, but I am hoping you can point me to a resource or tutorial that help me develop my understanding of how the backend of this IDE works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Oct 2014 22:07:23 GMT</pubDate>
    <dc:creator>bosleymusic_com</dc:creator>
    <dc:date>2014-10-30T22:07:23Z</dc:date>
    <item>
      <title>I2C Master Driver Hanging on Kinetis K22.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367213#M685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to use the I2C Master Driver in a Bare Metal application.&lt;/P&gt;&lt;P&gt;Currently when I use the I2C Master Driver I'm ending up here :&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Default_Handler:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; b .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; .size Default_Handler, . - Default_Handler&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tracing the error backwards, this is the function sequence :&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;I2C_DRV_MasterSendDataBlocking &lt;SPAN style="color: #000000;"&gt;calls&lt;/SPAN&gt; I2C_DRV_SendAddress &lt;SPAN style="color: #000000;"&gt;calls&lt;/SPAN&gt; I2C_DRV_MasterWait &lt;SPAN style="color: #000000;"&gt;calls&lt;/SPAN&gt; OSA_SemaWait &lt;SPAN style="color: #000000;"&gt;calls&lt;/SPAN&gt; OSA_TimeGetMsec() &lt;SPAN style="color: #000000;"&gt;calls&lt;/SPAN&gt; LPTMR_HAL_GetCounterValue(uint32_t baseAddr):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;static inline uint32_t LPTMR_HAL_GetCounterValue(uint32_t baseAddr)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BW_LPTMR_CNR_COUNTER(baseAddr, 0);&amp;nbsp; /* Must first write to the CNR with any value */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (uint32_t)(BR_LPTMR_CNR_COUNTER(baseAddr) &amp;amp; 0xFFFFU);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;/*! @brief Set the COUNTER field to a new value. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;#define BW_LPTMR_CNR_COUNTER(x, v) (HW_LPTMR_CNR_WR(x, (HW_LPTMR_CNR_RD(x) &amp;amp; ~BM_LPTMR_CNR_COUNTER) | BF_LPTMR_CNR_COUNTER(v)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;/*@}*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The baseAddr is 04004000 which is correct for LPTMR, and I have verified the LPTMR is enabled (set up by OSA_Init, called in my main).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone had this problem and been able to solve it? I will add some of my attempts to solve this as I work through it, but if anyone can point to a solution that would be cool also.&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;EDIT: From a hardware perspective, and I probably should have said this to begin with, the clocking and data are coming out of the pins correctly for the Address send, but then they hang low permanently.&lt;/P&gt;&lt;P&gt;I've tried just hooking to the scope and would think that after the I2C doesn't receive anything back it would reset high - at least that's the way it has worked on other chips I've used...&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;EDIT II: Ran the i2c_rtos_ucosiii project successfully.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 17:17:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367213#M685</guid>
      <dc:creator>bosleymusic_com</dc:creator>
      <dc:date>2014-10-30T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Master Driver Hanging on Kinetis K22.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367214#M686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Donald:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That seems like you are missing the I2C ISR functions. The actual interrupt service code is in fsl_i2c_master_driver.c, but you need a file with the ISRs, which will only call the actual function in the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the example file I took from the I2C_comm demo of KSDK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this solves the problem.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&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>Thu, 30 Oct 2014 20:40:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367214#M686</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-10-30T20:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Master Driver Hanging on Kinetis K22.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367215#M687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Narrowing down the issue a little bit : OSA_status returns success, LPTMR is in motion.&lt;/P&gt;&lt;P&gt;Reviewed registers in I2C as I stepped through :&lt;/P&gt;&lt;P&gt;Control Register IICIE is enabled at I2C_HAL_SendStart(baseAddr) called from I2C_DRV_MasterSendDataBlocking,&amp;nbsp; but there is no handler defined for the interrupt within the driver or inits...hence dumping into default handler. So, I set I2C_HAL_SetIntCmd within I2C_DRV_MasterSendDataBlocking to false, and voila. EDIT: Crashing worse. Will set up interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shouldn't there be something about setting an interrupt in the documentation for the API if it's necessary to operate with the default behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 21:11:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367215#M687</guid>
      <dc:creator>bosleymusic_com</dc:creator>
      <dc:date>2014-10-30T21:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Master Driver Hanging on Kinetis K22.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367216#M688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I saw this after I posted my own reply. Not sure if it's a good idea or not, but for a temporary fix, I set a value to false as outlined below : &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 21:14:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367216#M688</guid>
      <dc:creator>bosleymusic_com</dc:creator>
      <dc:date>2014-10-30T21:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Master Driver Hanging on Kinetis K22.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367217#M689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this is a better question to ask since these functions are included in the KSDK files in my includes already. I seem to have issues with include files not showing up when I compile, and I assume this has something to do with my linker or include settings, because with some things, simply declaring #include "X" or "include &amp;lt;X&amp;gt; leads to errors. Is there a common method to fix this, or have these files more easily recognized? I attribute this to lack of understanding with Eclipse, but I am hoping you can point me to a resource or tutorial that help me develop my understanding of how the backend of this IDE works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:07:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367217#M689</guid>
      <dc:creator>bosleymusic_com</dc:creator>
      <dc:date>2014-10-30T22:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Master Driver Hanging on Kinetis K22.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367218#M690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Donald:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If trying to include any header file, make sure the corresponding path is added to Project -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; Cross ARM C Compiler -&amp;gt; Includes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Include_KDS.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/45856i6E4CBC1CE32B2DF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Include_KDS.png" alt="Include_KDS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not familiar with Eclipse then it is highly recommended that you visit &lt;A href="http://mcuoneclipse.com/" title="http://mcuoneclipse.com/"&gt;MCU on Eclipse | Everything on Eclipse, Microcontrollers and Software&lt;/A&gt;. This site is maintained by colleague Erich Styger and has lots of tutorials about Eclipse and Embedded Systems in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 23:16:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Master-Driver-Hanging-on-Kinetis-K22/m-p/367218#M690</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-10-30T23:16:02Z</dc:date>
    </item>
  </channel>
</rss>

