<?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: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&amp;gt;irqSync, 0) within the function in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452890#M15213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Duane:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which board you are using, frdmK64f or other?&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>Wed, 16 Sep 2015 22:42:08 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2015-09-16T22:42:08Z</dc:date>
    <item>
      <title>I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452889#M15212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, sorry to trouble you for something that will probably be a NOOB issue.&amp;nbsp; I am running MQX 4.2, KSDK 1.2, KDS 3.0 and have created a test MQX app using Processor Expert to create a couple GPIO drivers, a couple tasks and an I2C driver on I2C1.&amp;nbsp; Just to begin to get some experience with working with the I2C driver I made a call to I2C_DRV_MasterInit() in the fsl_i2c_master_driver.c and it seems to go into an endless loop at:&lt;/P&gt;&lt;P&gt;Line #103, OSA_SemaCreate(&amp;amp;master-&amp;gt;irqSync, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried it with enabled I2C interrupts and without but the result is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything is autogenerated except the call to I2C_DRV_MasterInit() and a couple variables.&amp;nbsp; I was able to get the GPIO and task stuff to work, but not the I2C.&amp;nbsp; By the way, I'm calling the I2C_DRV_MasterInit() from the main() function in the main.c file that is autogenerated.&amp;nbsp;&amp;nbsp; I've tried to keep things real basic to make it easier to troubleshoot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, are there going to be in tutorials for this stuff based upon the latest MQX 4.2, KSDK 1.2, KDS 3.0?&amp;nbsp; It's confusing because the newer versions appear to do a lot of the low-level setups while there's no examples that match my configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 22:33:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452889#M15212</guid>
      <dc:creator>wildhorsemusic</dc:creator>
      <dc:date>2015-09-15T22:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452890#M15213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Duane:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which board you are using, frdmK64f or other?&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>Wed, 16 Sep 2015 22:42:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452890#M15213</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2015-09-16T22:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452891#M15214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&amp;nbsp; Yes, it is the FRDM-K64F board, with the EVBCRTOUCH board.&amp;nbsp; I discovered that I needed to move my code out of main.c.&amp;nbsp; I then tried to put a I2C_DRV_MasterReceiveData() function in the ISR, but it doesn't present the proper I2C Slave Address for some reason.&amp;nbsp; So, When I put the I2C_DRV_MasterReceiveData() function in a task, I can now see the proper addressing on my logic probe. However, the problem is that the CRTOUCH won't clear the IRQ pin until I read the CRTOUCH registers. But, because the ISR has a preemptive priority, the task never gets called because the IRQ pin is forcing the ISR to continuously fire.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have studied the CRTOUCH Datasheet, but it is pretty light on it's description of the I2C read flows.&amp;nbsp; I know it's a timing issue, but I haven't been able to find an example of the EVBCRTOUCH board and FRDM-K64F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your time and insights!&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 23:46:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452891#M15214</guid>
      <dc:creator>wildhorsemusic</dc:creator>
      <dc:date>2015-09-16T23:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452892#M15215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Duane:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not good to put the I2C_DRV_MasterReceiveData function in the ISR, putting it in a task is right.&lt;/P&gt;&lt;P&gt;Yes there is a timing issue between the two boards, unfortunately we don't have an example of the EVBCRTOUCH board and FRDM-K64F.&lt;/P&gt;&lt;P&gt;I have an idea, but I don't know whether it work or not. You can disable the CRTOUCH interrupt in the ISR.&amp;nbsp; then the receive task should run.&lt;/P&gt;&lt;P&gt;And in the receive task, enable the interrupt again.&lt;/P&gt;&lt;P&gt;You can try it. Hope you have good luck&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, 18 Sep 2015 07:20:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452892#M15215</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2015-09-18T07:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452893#M15216</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;We must have been thinking the same thing! 1st thing to know is that the CRTOUCH interrupt pin can only be cleared by reading the status registers in the CRTOUCH and I also by reading the data register (I think).&amp;nbsp; BOTH of these require a read operation... which won't run within the ISR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried disabling the pin interrupts for PORTC so at least the MCU would not respond to the CRTOUCH after getting the initial IRQ:&lt;/P&gt;&lt;P&gt;ISR CODE:&lt;/P&gt;&lt;P&gt;PORT_HAL_ClearPortIntFlag(PORTC_BASE_PTR);&lt;/P&gt;&lt;P&gt;PORT_HAL_SetPinIntMode(PORTC_BASE_PTR,PADEVT,kPortIntDisabled);&lt;/P&gt;&lt;P&gt;_lwevent_set(&amp;amp;portcevents,0x01);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's surprising to see this problem, when it is common to have to read a register on the slave device in order to clear the interrupt.&lt;/P&gt;&lt;P&gt;Also, it's surprising that no example exists for a Freescale M4 processor and CRTOUCH combination.&amp;nbsp; It doesn't appear that the CRTOUCH is that popular or isn't used in this configuration very often? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I chose the Freescale K64F, KDS, MQX platform because it appeared that Freescale was very engaged with creating solutions for easy 'on-ramp' of their products.&amp;nbsp; Instead, I'm spending days and hours working on basic interface issues instead of my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to dump on you Daniel, I guess I just need another cup of whiskey... I mean coffee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if find a solution.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 17:38:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452893#M15216</guid>
      <dc:creator>wildhorsemusic</dc:creator>
      <dc:date>2015-09-18T17:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452894#M15217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Duane:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can configure the interrupt pin&amp;nbsp; as level trigger or edge trigger.&amp;nbsp; Please see&amp;nbsp; Regitster PORTx_PCRn, 19-16.&amp;nbsp;&amp;nbsp;&amp;nbsp; Could you try to configure the interrupt pin to edge trigger?&amp;nbsp; Please check the reference manual for more details.&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, 28 Sep 2015 06:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452894#M15217</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2015-09-28T06:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452895#M15218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp; I was able to get out of the ISR by setting the value to "Falling Edge".&amp;nbsp; Thank you.&amp;nbsp; Now the code will hang after cycling through the task a couple of times.&amp;nbsp; I have determined that it's hanging in the driver.&amp;nbsp; The driver waits for confirmation of send/receive of data. Somehow, it gets stuck there.&amp;nbsp; Any thoughts on why this is happening?&amp;nbsp; The driver seems have all of the proper "waits' in place, so the processor should not be able to run ahead of the slower I2C bus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached my test project for your review... but, I'm trying to keep things real simple until I can get it all working. &lt;/P&gt;&lt;P&gt;I am hoping to move on to an eDMA test once I understand the nuances of getting the FRDM-K64F and CRTouch working together.&amp;nbsp; It's really basic stuff, I know, but I'm having challenges in getting success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 05:32:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452895#M15218</guid>
      <dc:creator>wildhorsemusic</dc:creator>
      <dc:date>2015-10-03T05:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452896#M15219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I removed all the code from my MQX task except the line containing:&lt;/P&gt;&lt;P&gt;pstatus = I2C_ReadRegister(PADADD,PADSTR); //Clear CRTouch Interrupt Pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do, the task runs clean, without any lockups.&amp;nbsp; I can touch the screen and the ISR is called and the task clears the CRTouch interrupt and the cycle repeats. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 05:36:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452896#M15219</guid>
      <dc:creator>wildhorsemusic</dc:creator>
      <dc:date>2015-10-03T05:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: I2C_DRV_MasterInit() getting stuck at OSA_SemaCreate(&amp;master-&gt;irqSync, 0) within the function</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452897#M15220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing that was giving me fits is that when using Processor Expert, you must pay attention to the ORDER of your components.&amp;nbsp; I had created one task, an I2C component and a GPIO component (in that order).&amp;nbsp; This order is how they are initialized in the CPU.c file created by PEX. In my project I was having issues with the application locking up and not firing the ISR.&amp;nbsp; This was because the task was started BEFORE the I2C was initialized.&amp;nbsp; Once I realized the issue, I dragged the components into their proper order and everything worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 18:05:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/I2C-DRV-MasterInit-getting-stuck-at-OSA-SemaCreate-master-gt/m-p/452897#M15220</guid>
      <dc:creator>wildhorsemusic</dc:creator>
      <dc:date>2015-10-08T18:05:24Z</dc:date>
    </item>
  </channel>
</rss>

