<?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 lwIP: S32 design studio-netifadd()   in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/lwIP-S32-design-studio-netifadd/m-p/854577#M4291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Before telling you about my problem. I will provide you with an example code that is present in MCU expresso design studio SDK example frdmk64_lwip_tcp_echo_freertos&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;SYSMPU_Type *base = SYSMPU;&lt;BR /&gt; //COnfigure pin routing features&lt;BR /&gt; BOARD_InitPins();&lt;BR /&gt; //Initilize boot clock configration&lt;BR /&gt; BOARD_BootClockRUN();&lt;BR /&gt; //Initilze debug console&lt;BR /&gt; BOARD_InitDebugConsole();&lt;BR /&gt; base-&amp;gt;CESR &amp;amp;= ~SYSMPU_CESR_VLD_MASK;&lt;BR /&gt; static struct netif fsl_netif0;&lt;BR /&gt; strcpy(fsl_netif0.name,"en");&lt;BR /&gt; ip4_addr_t fsl_netif0_ipaddr, fsl_netif0_netmask, fsl_netif0_gw;&lt;BR /&gt; ethernetif_config_t fsl_enet_config0 = {.phyAddress = TL_PHY_ADDRESS, .clockName = TL_CLOCK_NAME, .macAddress = TL_MAC_ADDR,};&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_ipaddr, TL_IP_ADDR0, TL_IP_ADDR1, TL_IP_ADDR2, TL_IP_ADDR3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_netmask, TL_NET_MASK0, TL_NET_MASK1, TL_NET_MASK2, TL_NET_MASK3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_gw, TL_GW_ADDR0, TL_GW_ADDR1, TL_GW_ADDR2, TL_GW_ADDR3);&lt;BR /&gt; tcpip_init(NULL, NULL);&lt;BR /&gt; netifapi_netif_add(&amp;amp;fsl_netif0, &amp;amp;fsl_netif0_ipaddr, &amp;amp;fsl_netif0_netmask, &amp;amp;fsl_netif0_gw, &amp;amp;fsl_enet_config0,ethernetif0_init, tcpip_input);&lt;BR /&gt; netifapi_netif_set_default(&amp;amp;fsl_netif0);&lt;BR /&gt; netifapi_netif_set_up(&amp;amp;fsl_netif0);&lt;BR /&gt; //Main function of&amp;nbsp;my application. After that freeRTOS tasks get created and my application starts&lt;BR /&gt; transport_main_freertos();&lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here you can clearly see, that my network interface are getting initialised in non-freeRTOS task.As soon as the network interface are initialised. My library function&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;transport_main_freertos() is executed which consist of three task that have priority 3, 4, 4 respectively are created ans everything works fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Now lets come to my problem&lt;/P&gt;&lt;P&gt;I have to shift my whole code to s32DesignStudio because of the hardware requirements (Previously, I was using FRDMK64. Now, I am using S32K148). The problem I am facing is that the functions which were executing in nonFreeRtos threads are now getting executed in FreeRTOS&amp;nbsp; threads. My requirement is that I want to execute these functions in nonFreeRTOS threads.&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of my code is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;static struct netif fsl_netif0;&lt;BR /&gt; strcpy(fsl_netif0.name,"en");&lt;BR /&gt; ip4_addr_t fsl_netif0_ipaddr, fsl_netif0_netmask, fsl_netif0_gw;&lt;/P&gt;&lt;P&gt;//This function is not present is s32Design studio. What should I use here ?&lt;BR /&gt;//ethernetif_config_t fsl_enet_config0 = {.phyAddress = TL_PHY_ADDRESS, .clockName = TL_CLOCK_NAME, .macAddress = TL_MAC_ADDR,};&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_ipaddr, TL_IP_ADDR0, TL_IP_ADDR1, TL_IP_ADDR2, TL_IP_ADDR3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_netmask, TL_NET_MASK0, TL_NET_MASK1, TL_NET_MASK2, TL_NET_MASK3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_gw, TL_GW_ADDR0, TL_GW_ADDR1, TL_GW_ADDR2, TL_GW_ADDR3);&lt;BR /&gt; tcpip_init(NULL, NULL);&lt;BR /&gt; netif_set_default(netif_add(&amp;amp;fsl_netif0, &amp;amp;fsl_netif0_ipaddr, &amp;amp;fsl_netif0_netmask, &amp;amp;fsl_netif0_gw, NULL,enet_ethernetif_init, tcpip_input));&lt;BR /&gt; netif_set_up(&amp;amp;fsl_netif0);&lt;BR /&gt; while(1){}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As you can see,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The struct&amp;nbsp;fsl_enet_config0&amp;nbsp; present in the above code is not present in the&amp;nbsp;s32 design studio example lwips32k148 Currently I am passing NULL but what should I use here?&lt;/P&gt;&lt;P&gt;The problem I am facing is that the network interface are initialized inFreeRTOS task with priority 1.&amp;nbsp; The application I am working has three threads which are working on priority &amp;gt;=3. As soon my application tasks are created the mainLoopTask() is preempted with higher priority tasks and my pings stop working.&lt;/P&gt;&lt;P&gt;I hope that you have a good idea about my problem.&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Saad&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2019 07:45:57 GMT</pubDate>
    <dc:creator>saad_saeed</dc:creator>
    <dc:date>2019-02-11T07:45:57Z</dc:date>
    <item>
      <title>lwIP: S32 design studio-netifadd()</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/lwIP-S32-design-studio-netifadd/m-p/854577#M4291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Before telling you about my problem. I will provide you with an example code that is present in MCU expresso design studio SDK example frdmk64_lwip_tcp_echo_freertos&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;SYSMPU_Type *base = SYSMPU;&lt;BR /&gt; //COnfigure pin routing features&lt;BR /&gt; BOARD_InitPins();&lt;BR /&gt; //Initilize boot clock configration&lt;BR /&gt; BOARD_BootClockRUN();&lt;BR /&gt; //Initilze debug console&lt;BR /&gt; BOARD_InitDebugConsole();&lt;BR /&gt; base-&amp;gt;CESR &amp;amp;= ~SYSMPU_CESR_VLD_MASK;&lt;BR /&gt; static struct netif fsl_netif0;&lt;BR /&gt; strcpy(fsl_netif0.name,"en");&lt;BR /&gt; ip4_addr_t fsl_netif0_ipaddr, fsl_netif0_netmask, fsl_netif0_gw;&lt;BR /&gt; ethernetif_config_t fsl_enet_config0 = {.phyAddress = TL_PHY_ADDRESS, .clockName = TL_CLOCK_NAME, .macAddress = TL_MAC_ADDR,};&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_ipaddr, TL_IP_ADDR0, TL_IP_ADDR1, TL_IP_ADDR2, TL_IP_ADDR3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_netmask, TL_NET_MASK0, TL_NET_MASK1, TL_NET_MASK2, TL_NET_MASK3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_gw, TL_GW_ADDR0, TL_GW_ADDR1, TL_GW_ADDR2, TL_GW_ADDR3);&lt;BR /&gt; tcpip_init(NULL, NULL);&lt;BR /&gt; netifapi_netif_add(&amp;amp;fsl_netif0, &amp;amp;fsl_netif0_ipaddr, &amp;amp;fsl_netif0_netmask, &amp;amp;fsl_netif0_gw, &amp;amp;fsl_enet_config0,ethernetif0_init, tcpip_input);&lt;BR /&gt; netifapi_netif_set_default(&amp;amp;fsl_netif0);&lt;BR /&gt; netifapi_netif_set_up(&amp;amp;fsl_netif0);&lt;BR /&gt; //Main function of&amp;nbsp;my application. After that freeRTOS tasks get created and my application starts&lt;BR /&gt; transport_main_freertos();&lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here you can clearly see, that my network interface are getting initialised in non-freeRTOS task.As soon as the network interface are initialised. My library function&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;transport_main_freertos() is executed which consist of three task that have priority 3, 4, 4 respectively are created ans everything works fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Now lets come to my problem&lt;/P&gt;&lt;P&gt;I have to shift my whole code to s32DesignStudio because of the hardware requirements (Previously, I was using FRDMK64. Now, I am using S32K148). The problem I am facing is that the functions which were executing in nonFreeRtos threads are now getting executed in FreeRTOS&amp;nbsp; threads. My requirement is that I want to execute these functions in nonFreeRTOS threads.&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of my code is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;static struct netif fsl_netif0;&lt;BR /&gt; strcpy(fsl_netif0.name,"en");&lt;BR /&gt; ip4_addr_t fsl_netif0_ipaddr, fsl_netif0_netmask, fsl_netif0_gw;&lt;/P&gt;&lt;P&gt;//This function is not present is s32Design studio. What should I use here ?&lt;BR /&gt;//ethernetif_config_t fsl_enet_config0 = {.phyAddress = TL_PHY_ADDRESS, .clockName = TL_CLOCK_NAME, .macAddress = TL_MAC_ADDR,};&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_ipaddr, TL_IP_ADDR0, TL_IP_ADDR1, TL_IP_ADDR2, TL_IP_ADDR3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_netmask, TL_NET_MASK0, TL_NET_MASK1, TL_NET_MASK2, TL_NET_MASK3);&lt;BR /&gt; IP4_ADDR(&amp;amp;fsl_netif0_gw, TL_GW_ADDR0, TL_GW_ADDR1, TL_GW_ADDR2, TL_GW_ADDR3);&lt;BR /&gt; tcpip_init(NULL, NULL);&lt;BR /&gt; netif_set_default(netif_add(&amp;amp;fsl_netif0, &amp;amp;fsl_netif0_ipaddr, &amp;amp;fsl_netif0_netmask, &amp;amp;fsl_netif0_gw, NULL,enet_ethernetif_init, tcpip_input));&lt;BR /&gt; netif_set_up(&amp;amp;fsl_netif0);&lt;BR /&gt; while(1){}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As you can see,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The struct&amp;nbsp;fsl_enet_config0&amp;nbsp; present in the above code is not present in the&amp;nbsp;s32 design studio example lwips32k148 Currently I am passing NULL but what should I use here?&lt;/P&gt;&lt;P&gt;The problem I am facing is that the network interface are initialized inFreeRTOS task with priority 1.&amp;nbsp; The application I am working has three threads which are working on priority &amp;gt;=3. As soon my application tasks are created the mainLoopTask() is preempted with higher priority tasks and my pings stop working.&lt;/P&gt;&lt;P&gt;I hope that you have a good idea about my problem.&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Saad&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 07:45:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/lwIP-S32-design-studio-netifadd/m-p/854577#M4291</guid>
      <dc:creator>saad_saeed</dc:creator>
      <dc:date>2019-02-11T07:45:57Z</dc:date>
    </item>
  </channel>
</rss>

