Hi Rahul,
Thank you for the patience.
Please check below KSDK team feedback about this issue:
There's a patch in KSDK1.3GA which might resolve this issue.
[KPSDK-7362][LWIP]Fix the lwip rtos ping block issue
diff --git a/middleware/tcpip/lwip/port/ethernetif.c b/middleware/tcpip/lwip/port/ethernetif.c
index 6e63cd0..044b5bd 100644
--- a/middleware/tcpip/lwip/port/ethernetif.c
+++ b/middleware/tcpip/lwip/port/ethernetif.c
@@ -688,14 +688,13 @@ ethernetif_init(struct netif *netif)
#if defined(FSL_RTOS_MQX)
OSA_InstallIntHandler(ENET_Transmit_IRQn, MQX_ENET_Transmit_IRQHandler);
OSA_InstallIntHandler(ENET_Receive_IRQn, MQX_ENET_Receive_IRQHandler);
-#if defined(FSL_RTOS_MQX)
OSA_InstallIntHandler(ENET_1588_Timer_IRQn, MQX_ENET_1588_Timer_IRQHandler);
#endif
/* Set priority for ISRs */
NVIC_SetPriority(ENET_1588_Timer_IRQn, 4U);
- NVIC_SetPriority(ENET_Transmit_IRQn, 4U);
- NVIC_SetPriority(ENET_Receive_IRQn, 4U);
-#endif
+ NVIC_SetPriority(ENET_Transmit_IRQn, 5U);
+ NVIC_SetPriority(ENET_Receive_IRQn, 5U);
+
/* initialize the hardware */
result = low_level_init(netif);
diff --git a/middleware/tcpip/lwip/port/lwipopts.h b/middleware/tcpip/lwip/port/lwipopts.h
index 199d0f0..dde8b8a 100644
--- a/middleware/tcpip/lwip/port/lwipopts.h
+++ b/middleware/tcpip/lwip/port/lwipopts.h
@@ -37,14 +37,14 @@
#define __LWIPOPTS_H__
/*include fsl os abstraction header file to judge whether OS is used*/
#include "fsl_os_abstraction.h"
+
+#if USE_RTOS
/**
* SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
* critical regions during buffer allocation, deallocation and memory
* allocation and deallocation.
*/
-#define SYS_LIGHTWEIGHT_PROT 0
-#if USE_RTOS
-
+#define SYS_LIGHTWEIGHT_PROT 1
/**
* NO_SYS==0: Use RTOS
*/
In KSDK1.2GA, the SYS_LIGHTWEIGHT_PROT macro is not enabled when RTOS is used, which may lead to crash for global variable is not protected.
I would recommend customer to update software to latest KSDK software.
You could find the latest KDSK software from below link:
Welcome to Kinetis Expert | Kinetis Expert
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------