MCU: TM4C1294NCPDT
TI-RTOS: v2.01.00.03
NDK: v2.23.01.01
CCS: v6.0.1.0040
-
Hi,
I have a firmware running on Tiva C MCU on top of TI-RTOS. The firmware also makes use of Embedded HTTP Web Server based out of the example as illustrated here .
In the code, I have multiple tasks running simultaneously. The tasks have priorities of 3, 5, 7, 9, 10 & 12. What I mean is that, the task priorities are selected between these few numbers only. For example, there are 10 tasks which have priority as 3 & 2 tasks which have priority 7, and so on. Now, due to some coding error (or something else which I need to diagnose), one task having task priority as 3 is executing in an infinite loop without any OS function call like Task_sleep() or Semaphore_pend() or Mailbox_pend(), etc. This is not happening at the beginning of the firmware running. This occurs after about 2 hours of continuous firmware run. This will get corrected if the hardware is restarted.
Now, in this situation, I find all higher priority tasks are running; whereas all tasks having priorities lower than or equal to 3 are getting blocked. Due to some urgency in delivering the code, I have reduced the priority of this erroneous task from 3 to 2. After doing this, I find that the task (whose priority I reduced from 3 to 2) has no effect on any other task as all other tasks are having priority greater than 2.
But, surprisingly, I find that the Embedded Web Server stops working once this phenomena (as explained above) occurs. Can anyone suggest where to look for? I have the following settings in the .cfg file, is any change of parameters required in the below mentioned script of the .cfg file?
EMAC.libType = EMAC.LibType_NonInstrumented;
Global.IPv6 = false;
Ip.autoIp = true;
Ip.address = "";
Ip.mask = "255.255.255.0";
Ip.gatewayIpAddr = "192.168.1.2";
Ip.domainName = "domain.com";
var http0Params = new Http.Params();
var http0 = Http.create(http0Params);
Global.lowTaskPriLevel = 3;
Global.stackInitHook = "&AddWebFiles";
Global.stackDeleteHook = "&RemoveWebFiles";
Global.networkIPAddrHook = "&mynetworkIPAddrHook";
Global.networkOpenHook = "&functionNetworkOpenHook";
Global.netSchedulerPri = Global.NC_PRIORITY_LOW;
Global.ndkThreadStackSize = 2048;
Global.lowTaskStackSize = 2048;
Global.normTaskStackSize = 2048;
Global.highTaskStackSize = 2048;
Also I find the following settings, is any change in this section help in resolving the issue, can anyone tell me why this even happens (the HTTP server non responsive)?
TI-RTOS -> Products -> NDK -> Networking - Scheduling Options ->
Network Scheduler Task Priority: Low Priority
Priority Level for Low Priority NDK Tasks : 3
Priority Level for Normal Priority NDK Tasks : 5
Priority Level for High Priority NDK Tasks : 7
Priority Level for Kernel Priority NDK Tasks : 9
-
NOTE: I do not have JTAG access to the hardware. The bootloader is permanently loaded on the MCU & new firmware is loaded using USB Thumb Drive and/or remotely via Ethernet/LAN or GSM/GPRS modem interface.
-
Regards
Soumyajit