<?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 MQX Event Related Query in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Event-Related-Query/m-p/372287#M12288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with Codewarrior v10.6 and of MQX v4.0 and created a project in which I need to set event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;To set Event I have taken an array of 16bit vector and set it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;for example,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 1 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint_16 EventVector;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//say EventVector at a moment is 0x0080. EventVector is changing continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Bits of EventVector will set according to condition,,,,,,,,,&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////my stuff........&lt;/P&gt;&lt;P&gt;if(condition)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _event_set(event_ptr,EventVector); //event is conditionally set &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 2 &lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_wait_all_ticks(event_ptr, EventVector, 0); &lt;/P&gt;&lt;P&gt;//my stuff..........&lt;/P&gt;&lt;P&gt;printf("1 \n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_clear(event_ptr,EventVector);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is what I have written with event create and all the other stuff in my project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is,&amp;nbsp; Task 2 is not waiting for the event. It is printing "1" all the time whether event is set or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I am writing like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 1 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint_16 EventVector;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//say EventVector at a moment is 0x0080. EventVector is changing continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Bits of EventVector will set according to condition,,,,,,,,,&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////my stuff........&lt;/P&gt;&lt;P&gt;if(condition)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _event_set(event_ptr,0x01); //event is conditionally set &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 2 &lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_wait_all_ticks(event_ptr, 0x01, 0); &lt;/P&gt;&lt;P&gt;//my stuff..........&lt;/P&gt;&lt;P&gt;printf("1 \n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_clear(event_ptr,0x01);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then "1" will be printed only when the even is set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why its is so??Can anybosy tell me how to pass the dynamically data into event...???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please don't suggest me to see the demo of Event in MQX which is , I have already seen and made the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz help...:smileysad::smileyconfused:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Nov 2014 09:48:03 GMT</pubDate>
    <dc:creator>utsavikalpesh</dc:creator>
    <dc:date>2014-11-26T09:48:03Z</dc:date>
    <item>
      <title>MQX Event Related Query</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Event-Related-Query/m-p/372287#M12288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with Codewarrior v10.6 and of MQX v4.0 and created a project in which I need to set event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;To set Event I have taken an array of 16bit vector and set it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;for example,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 1 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint_16 EventVector;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//say EventVector at a moment is 0x0080. EventVector is changing continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Bits of EventVector will set according to condition,,,,,,,,,&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////my stuff........&lt;/P&gt;&lt;P&gt;if(condition)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _event_set(event_ptr,EventVector); //event is conditionally set &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 2 &lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_wait_all_ticks(event_ptr, EventVector, 0); &lt;/P&gt;&lt;P&gt;//my stuff..........&lt;/P&gt;&lt;P&gt;printf("1 \n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_clear(event_ptr,EventVector);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is what I have written with event create and all the other stuff in my project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is,&amp;nbsp; Task 2 is not waiting for the event. It is printing "1" all the time whether event is set or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I am writing like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 1 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint_16 EventVector;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//say EventVector at a moment is 0x0080. EventVector is changing continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Bits of EventVector will set according to condition,,,,,,,,,&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////my stuff........&lt;/P&gt;&lt;P&gt;if(condition)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _event_set(event_ptr,0x01); //event is conditionally set &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task 2 &lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_wait_all_ticks(event_ptr, 0x01, 0); &lt;/P&gt;&lt;P&gt;//my stuff..........&lt;/P&gt;&lt;P&gt;printf("1 \n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_event_clear(event_ptr,0x01);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then "1" will be printed only when the even is set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why its is so??Can anybosy tell me how to pass the dynamically data into event...???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please don't suggest me to see the demo of Event in MQX which is , I have already seen and made the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz help...:smileysad::smileyconfused:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 09:48:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Event-Related-Query/m-p/372287#M12288</guid>
      <dc:creator>utsavikalpesh</dc:creator>
      <dc:date>2014-11-26T09:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Event Related Query</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Event-Related-Query/m-p/372288#M12289</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;Please check the below link, you can find some labs&amp;nbsp; that explain step to step how to create projects using a Kinetis Device and some OS services.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-102663"&gt;MQX Basics Training - 6 Tutorials (Labs) for MQX Begginers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please check the lab "Using Events and Mutex"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol &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>Wed, 26 Nov 2014 20:44:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Event-Related-Query/m-p/372288#M12289</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2014-11-26T20:44:50Z</dc:date>
    </item>
  </channel>
</rss>

