<?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 Mlme_Main return value in Other NXP Products</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/Mlme-Main-return-value/m-p/207481#M2249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make an application that uses de 802.15.4 MacPhy on the freescale MC13224, but I don't want to use the complete freescale beekit MAC codebase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried removing a lot of code-files generated by the beekit to get some idea of how the MacPhy.a library works, but I'm having some difficulties understanding how I should call Mlme_Main. The NwkMacInterface.h file says the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/************************************************************************************* MAC main function. Must be called by the NWK loop until it returns FALSE. The * function will examine the MAC input queues, and handle incoming/outgoing* MAC/MCPS messages.*   * Interface assumptions:*   None*   * Return value:*   TRUE if there are more messages for the Mlme_Main function process.*   FALSE otherwise.* ************************************************************************************///bool_t Mlme_Main(uint16_t events);void Mlme_Main(event_t events);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the bool_t version is commented out, but it seems that is the one I need. So i commented the function returning a void and use the one returning an bool_t.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I'm having is that it always returns TRUE, even if I haven't sent any message to the MAC layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having some other concerns as to the dependency's of MACPHY.a as it has a dependancy to the gbTaskMode,&amp;nbsp;gMacTaskID_c, TS_SendEvent, TMR_StartTimer, TMR_IsTimerActive, TMR_StopTimer and TMR_AllocateTimer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call Init_802_15_4(FALSE) so&amp;nbsp;the global gbTaskMode variable is set to FALSE ( because i don't want to use the TS )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call&amp;nbsp;MacPhyInit_Initialize this triggers an TMR_AllocateTimer(), but no timers are started, so that should not be a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now I'm still not sure how I should use Mlme_Main without using the Timer and TaskScheduler module from freescale. And I can't seem to find any documentation for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Main in MApp_init now looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;uint32_t mlme_mainCalls = 0x00;void Main(void){  InterruptInit();  IntDisableAll();  Platform_Init();    /* Don't use TS for MAC*/  Init_802_15_4(FALSE);    for(;;) {    DelayMs(1000);    while(Mlme_Main(0)) {      mlme_mainCalls++;    }            }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jun 2010 17:49:17 GMT</pubDate>
    <dc:creator>RoyVersteeg</dc:creator>
    <dc:date>2010-06-17T17:49:17Z</dc:date>
    <item>
      <title>Mlme_Main return value</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Mlme-Main-return-value/m-p/207481#M2249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make an application that uses de 802.15.4 MacPhy on the freescale MC13224, but I don't want to use the complete freescale beekit MAC codebase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried removing a lot of code-files generated by the beekit to get some idea of how the MacPhy.a library works, but I'm having some difficulties understanding how I should call Mlme_Main. The NwkMacInterface.h file says the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/************************************************************************************* MAC main function. Must be called by the NWK loop until it returns FALSE. The * function will examine the MAC input queues, and handle incoming/outgoing* MAC/MCPS messages.*   * Interface assumptions:*   None*   * Return value:*   TRUE if there are more messages for the Mlme_Main function process.*   FALSE otherwise.* ************************************************************************************///bool_t Mlme_Main(uint16_t events);void Mlme_Main(event_t events);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the bool_t version is commented out, but it seems that is the one I need. So i commented the function returning a void and use the one returning an bool_t.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I'm having is that it always returns TRUE, even if I haven't sent any message to the MAC layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having some other concerns as to the dependency's of MACPHY.a as it has a dependancy to the gbTaskMode,&amp;nbsp;gMacTaskID_c, TS_SendEvent, TMR_StartTimer, TMR_IsTimerActive, TMR_StopTimer and TMR_AllocateTimer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call Init_802_15_4(FALSE) so&amp;nbsp;the global gbTaskMode variable is set to FALSE ( because i don't want to use the TS )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call&amp;nbsp;MacPhyInit_Initialize this triggers an TMR_AllocateTimer(), but no timers are started, so that should not be a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now I'm still not sure how I should use Mlme_Main without using the Timer and TaskScheduler module from freescale. And I can't seem to find any documentation for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Main in MApp_init now looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;uint32_t mlme_mainCalls = 0x00;void Main(void){  InterruptInit();  IntDisableAll();  Platform_Init();    /* Don't use TS for MAC*/  Init_802_15_4(FALSE);    for(;;) {    DelayMs(1000);    while(Mlme_Main(0)) {      mlme_mainCalls++;    }            }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 17:49:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Mlme-Main-return-value/m-p/207481#M2249</guid>
      <dc:creator>RoyVersteeg</dc:creator>
      <dc:date>2010-06-17T17:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mlme_Main return value</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Mlme-Main-return-value/m-p/207482#M2250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Roy Versteeg wrote:&lt;BR /&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make an application that uses de 802.15.4 MacPhy on the freescale MC13224, but I don't want to use the complete freescale beekit MAC codebase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Checkout my code at &lt;A href="http://mc13224.devl.org" rel="nofollow" target="_self"&gt;mc13224.devl.org&lt;/A&gt;, specifically &lt;A href="http://mc13224.devl.org/libmc1322x.html" rel="nofollow" target="_self"&gt;libmc1322x.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't use any of the beekit codebase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Mar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 18:09:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Mlme-Main-return-value/m-p/207482#M2250</guid>
      <dc:creator>redbee</dc:creator>
      <dc:date>2010-06-17T18:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Mlme_Main return value</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Mlme-Main-return-value/m-p/207483#M2251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Redbee,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That looks realy&amp;nbsp;promising, although i haven't got it working on windows yet. I'll&amp;nbsp;definitely look into this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the meantime I hope someone has an answer to my question above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Roy&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2010 15:21:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Mlme-Main-return-value/m-p/207483#M2251</guid>
      <dc:creator>RoyVersteeg</dc:creator>
      <dc:date>2010-06-22T15:21:43Z</dc:date>
    </item>
  </channel>
</rss>

