<?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>S32KのトピックRe: lwip_FreeRTOS_s32k396' example project and failure</title>
    <link>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2139056#M51227</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/245816"&gt;@zhangzhixing&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I apologize for delayed response caused my workload.&lt;/P&gt;
&lt;P&gt;The board was successfully brought up without any issues. However, a few minor adjustments to the project are necessary:&lt;/P&gt;
&lt;P&gt;Peripherals &amp;gt; Pins: The TX_CLK signal did not have a specified direction — it has been set to Input. I also selected Fastest settings as the initial option.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_1-1753252879635.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349009i6862FF506BA4E147/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_1-1753252879635.png" alt="PavelL_1-1753252879635.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Peripherals &amp;gt; Managed SDK Components: The Pins driver component was missing and has been added.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_2-1753252945447.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349011i7BDAC39C821254BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_2-1753252945447.png" alt="PavelL_2-1753252945447.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Clock settings: Configuration is correct — the FXOS 40 MHz clock matches the crystal used on the board.&lt;BR /&gt;PHY initialization: The call to Eth_T_InitPhys(); in device.c was commented out, as it is not required. The TJA1103 PHY relies solely on pin strapping for basic configuration.&lt;/P&gt;
&lt;P&gt;I use&amp;nbsp;TJA1103-SDBR board - TJA1103 needs to be in rev-RMII mode to generate clock on TXC -&amp;gt; added jumper 2-3 to CONFIG4&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_3-1753253078564.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349012i85EC29053B7DB702/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_3-1753253078564.png" alt="PavelL_3-1753253078564.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_4-1753253345703.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349014iF6111A525CAEAA7E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_4-1753253345703.png" alt="PavelL_4-1753253345703.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To improve behavior after power up, comment all rows with PIT in device.c (PIT is not used in this example):&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// IntCtrl_Ip_InstallHandler(PIT0_IRQn, PIT_0_ISR, NULL_PTR);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// IntCtrl_Ip_SetPriority(PIT0_IRQn, 4);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// IntCtrl_Ip_EnableIrq(PIT0_IRQn)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_Init(PIT_INST, &amp;amp;PIT_0_InitConfig_PB_VS_0);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_InitChannel(PIT_INST, PIT_0_CH_0);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_EnableChannelInterrupt(PIT_INST, CH_0);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// PitPeriod = Clock_Ip_GetClockFrequency(PIT0_CLK) / 1000;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_StartChannel(PIT_INST, CH_0, PitPeriod);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jul 2025 10:10:43 GMT</pubDate>
    <dc:creator>PavelL</dc:creator>
    <dc:date>2025-07-23T10:10:43Z</dc:date>
    <item>
      <title>lwip_FreeRTOS_s32k396' example project and failure</title>
      <link>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2136326#M51065</link>
      <description>&lt;P&gt;I'm currently using the S32K396 MCU with a raw TCP client implementation, which works fine. However, my module supplier requires me to switch to lwIP with FreeRTOS.&lt;/P&gt;&lt;P&gt;After importing the 'lwip_FreeRTOS_s32k396' example project and flashing it to my K396 board, the program enters the vPortEnterCritical() function when executing prvPortStartFirstTask(). How can I resolve this issues&lt;/P&gt;&lt;P&gt;S32DS versioln&amp;nbsp; 3.5&lt;/P&gt;&lt;P&gt;RTD version 4.0&lt;/P&gt;&lt;P&gt;lwip version 1.0.4&lt;/P&gt;&lt;P&gt;freeRTOS version 4.0&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 07:11:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2136326#M51065</guid>
      <dc:creator>zhangzhixing</dc:creator>
      <dc:date>2025-07-18T07:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: lwip_FreeRTOS_s32k396' example project and failure</title>
      <link>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2136457#M51080</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I didn't add any code, but this issue occurred when I just compiled, downloaded, and debugged the lwip_FreeRTOS_s32k396 project.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;there is another question：&lt;/P&gt;&lt;P&gt;why setting uxCriticalNesting to 0 ，&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhangzhixing_0-1752830429511.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/348249i621C732518FA957C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhangzhixing_0-1752830429511.png" alt="zhangzhixing_0-1752830429511.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 09:23:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2136457#M51080</guid>
      <dc:creator>zhangzhixing</dc:creator>
      <dc:date>2025-07-18T09:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: lwip_FreeRTOS_s32k396' example project and failure</title>
      <link>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2139056#M51227</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/245816"&gt;@zhangzhixing&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I apologize for delayed response caused my workload.&lt;/P&gt;
&lt;P&gt;The board was successfully brought up without any issues. However, a few minor adjustments to the project are necessary:&lt;/P&gt;
&lt;P&gt;Peripherals &amp;gt; Pins: The TX_CLK signal did not have a specified direction — it has been set to Input. I also selected Fastest settings as the initial option.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_1-1753252879635.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349009i6862FF506BA4E147/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_1-1753252879635.png" alt="PavelL_1-1753252879635.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Peripherals &amp;gt; Managed SDK Components: The Pins driver component was missing and has been added.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_2-1753252945447.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349011i7BDAC39C821254BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_2-1753252945447.png" alt="PavelL_2-1753252945447.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Clock settings: Configuration is correct — the FXOS 40 MHz clock matches the crystal used on the board.&lt;BR /&gt;PHY initialization: The call to Eth_T_InitPhys(); in device.c was commented out, as it is not required. The TJA1103 PHY relies solely on pin strapping for basic configuration.&lt;/P&gt;
&lt;P&gt;I use&amp;nbsp;TJA1103-SDBR board - TJA1103 needs to be in rev-RMII mode to generate clock on TXC -&amp;gt; added jumper 2-3 to CONFIG4&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_3-1753253078564.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349012i85EC29053B7DB702/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_3-1753253078564.png" alt="PavelL_3-1753253078564.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PavelL_4-1753253345703.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349014iF6111A525CAEAA7E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PavelL_4-1753253345703.png" alt="PavelL_4-1753253345703.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To improve behavior after power up, comment all rows with PIT in device.c (PIT is not used in this example):&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// IntCtrl_Ip_InstallHandler(PIT0_IRQn, PIT_0_ISR, NULL_PTR);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// IntCtrl_Ip_SetPriority(PIT0_IRQn, 4);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// IntCtrl_Ip_EnableIrq(PIT0_IRQn)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_Init(PIT_INST, &amp;amp;PIT_0_InitConfig_PB_VS_0);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_InitChannel(PIT_INST, PIT_0_CH_0);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_EnableChannelInterrupt(PIT_INST, CH_0);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// PitPeriod = Clock_Ip_GetClockFrequency(PIT0_CLK) / 1000;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;// Pit_Ip_StartChannel(PIT_INST, CH_0, PitPeriod);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 10:10:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2139056#M51227</guid>
      <dc:creator>PavelL</dc:creator>
      <dc:date>2025-07-23T10:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: lwip_FreeRTOS_s32k396' example project and failure</title>
      <link>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2139068#M51228</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/245816"&gt;@zhangzhixing&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Initialize the variable&amp;nbsp;uxCriticalNesting&amp;nbsp;to&amp;nbsp;0&amp;nbsp;serves to several important purposes:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;System starts outside of any critical section&lt;BR /&gt;At system startup, no critical sections have been entered yet. Initializing&amp;nbsp;uxCriticalNesting&amp;nbsp;to&amp;nbsp;0&amp;nbsp;reflects this clean state and ensures that interrupts are enabled by default.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Per-task context tracking&lt;BR /&gt;Each task in FreeRTOS maintains its own&amp;nbsp;uxCriticalNesting&amp;nbsp;value as part of its Task Control Block (TCB). This value is saved and restored during context switches to preserve the correct interrupt state per task.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Ensures system stability&lt;BR /&gt;Setting a non-zero value at initialization could result in interrupts being unintentionally disabled, leading to unexpected behavior or system hangs. A zero value guarantees that the scheduler and interrupt handling start in a consistent and safe state.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;In lwIP examples (especially when using the threaded API or raw API), proper interrupt and critical section management is essential. Starting with&amp;nbsp;uxCriticalNesting = 0&amp;nbsp;ensures that the network stack and scheduler operate reliably from the beginning&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 06:59:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/lwip-FreeRTOS-s32k396-example-project-and-failure/m-p/2139068#M51228</guid>
      <dc:creator>PavelL</dc:creator>
      <dc:date>2025-07-23T06:59:51Z</dc:date>
    </item>
  </channel>
</rss>

