Ok calling fnIKSClient(0) from application.c fixes the issue so it must be something with TaskConfig.h
Here's the code contained in TaskConfig.h
/********************************************************************
Mark Butcher Bsc (Hons) MPhil MIEE
M.J.Butcher Consulting
Obere Bahnhofstrasse 13, 5507 Mellingen
www.uTasker.com Skype: M_J_Butcher
---------------------------------------------------------------------
File: TaskConfig.h
Project: Single Chip Embedded Internet
---------------------------------------------------------------------
Copyright (C) M.J.Butcher Consulting 2004..2008
*********************************************************************
28.04.2007 Add SNMP task
13.05.2007 Add PPP task
*/
/******************************** The tasks used in the system ********************************************/
/* Warning - each task must use a unique letter equivalent to the start of its task name */
#define TASK_WATCHDOG 'W' // watchdog task
#define TASK_ETHERNET 'E' // ethernet task
#define TASK_ARP 'A' // ARP task
#define TASK_TCP 'T' // TCP task
#define TASK_BOOTP 'B' // Bootp task
#define TASK_DHCP 'D' // DHCP task
#define TASK_DNS 'd' // DNS task
#define TASK_POP3 'P' // POP 3 task
#define TASK_PPP 'U' // PPP task
#define TASK_SMTP 'S' // SMTP task
#define TASK_FTP 'F' // FTP task
#define TASK_TFTP 't' // TFTP task
#define TASK_APPLICATION 'a' // application task
#define TASK_CAN_SIM 'c' // CAN simulator task
#define TASK_DEBUG 'm' // debugger (maintenance) task
#define TASK_TIMER 'p' // timer task for global timer use
#define TASK_LCD 'L' // application LCD task
#define TASK_KEY 'K' // keyboard scanning task
#define TASK_NETWORK_INDICATOR 'N' // task displaying network activity
#define TASK_DATA_SOCKET 's' // task handling data socket
#define TASK_ICMP 'i' // this is a pseudotask for sending ping results
#define TASK_LOW_POWER 'l' // Task supporting power saving
#define TASK_SNMP 'M' // snMp protocol task
#define TASK_IKS_CLIENT 'I'
#undef OWN_TASK
#ifdef LAN_REPORT_ACTIVITY
#define INTERRUPT_TASK_PHY TASK_NETWORK_INDICATOR // This task is woken on PHY changes (set 0 for none)
#endif
#define UNETWORK_MASTER TASK_APPLICATION // This task is worken on uNetwork error events
#define INTERRUPT_TASK_LAN_EXCEPTIONS TASK_NETWORK_INDICATOR // This task is woken on Ethernet exceptions (set 0 for none)
#define INTERRUPT_TASK_SERIAL_CONTROL TASK_APPLICATION // This task is woken on general serial control line changes (set 0 for none)
#define CAN_ERROR_TASK TASK_APPLICATION // This task is woken on CAN errors
extern void fnTaskWatchdog(TTASKTABLE *);
extern void fnApplication(TTASKTABLE *);
extern void fnDebug(TTASKTABLE *);
extern void fnTaskEthernet(TTASKTABLE *);
extern void fnTaskArp(TTASKTABLE *);
extern void fnTaskTCP(TTASKTABLE *);
extern void fnDHCP(TTASKTABLE *);
extern void fnBootp(TTASKTABLE *);
extern void fnDNS(TTASKTABLE *);
extern void fnPOP3(TTASKTABLE *);
extern void fnSmtp(TTASKTABLE *);
extern void fnTftp(TTASKTABLE *);
extern void fnLCD(TTASKTABLE *);
extern void fnADC(TTASKTABLE *);
extern void fnKey(TTASKTABLE *);
extern void fnTimer(TTASKTABLE *);
extern void fnNetworkIndicator(TTASKTABLE *);
extern void fnLowPower(TTASKTABLE *);
extern void fnSNMP(TTASKTABLE *);
extern void fnPPP(TTASKTABLE *);
extern void fnIKSClient(TTASKTABLE *ptrTaskTable);
/************ uTasker task table is defined here but only used by the hardware module initiates the system ***********/
#define DEFAULT_NODE_NUMBER 1 // we use one fixed node in the system
#ifdef SUPPORT_DISTRIBUTED_NODES
extern const unsigned char ucNodeMac[MAX_NETWORK_NODES][MAC_LENGTH];
#endif
#ifdef OPSYS_CONFIG // this is only set in the hardware module
CONFIG_LIMIT OurConfigNr = DEFAULT_NODE_NUMBER; // in single node system this can be initialised with a fixed value
#ifdef SUPPORT_DISTRIBUTED_NODES
NETWORK_LIMIT OurNetworkNumber = 0; // this value must be set (to non-zero) on startup individually for each node in the network
const unsigned char ucNodeMac[MAX_NETWORK_NODES][MAC_LENGTH] = {
{0,0,0,0,0,1}, // MAC address of nodes in the system
{0,0,0,0,0,2}
};
#endif
const HEAP_NEEDS ctOurHeap[] = {
{DEFAULT_NODE_NUMBER, OUR_HEAP_SIZE}, // our node requires this amount of heap space
{0} // end
};
const UTASK_TASK ctNodes[] = { // we use a single fixed configuration (single node)
DEFAULT_NODE_NUMBER, // configuration our single node
TASK_WATCHDOG, // watchdog task
#ifdef USE_IP
TASK_ARP, // ARP task
#endif
#ifdef ETH_INTERFACE
TASK_ETHERNET, // ethernet task
#endif
#ifdef USE_TCP
TASK_TCP, // TCP task
#endif
TASK_APPLICATION, // application task
TASK_DEBUG, // maintenance task
#ifdef USE_BOOTP
TASK_BOOTP, // Bootp task
#endif
#ifdef USE_DHCP
TASK_DHCP, // DHCP task
#endif
#ifdef USE_DNS
TASK_DNS, // DNS task
#endif
#ifdef USE_POP3
TASK_POP3, // POP 3 task
#endif
#ifdef USE_SMTP
TASK_SMTP, // POP 3 task
#endif
#ifdef USE_FTP
TASK_FTP, // FTP task
#endif
#ifdef USE_TFTP
TASK_TFTP, // TFTP task
#endif
#ifdef SUPPORT_LCD
TASK_LCD, // LCD task
#endif
#ifdef USE_SNMP
TASK_SNMP, // SNMP task
#endif
#ifdef SUPPORT_ADC
TASK_ADC, // ADC task
#endif
#ifdef USE_PPP
TASK_PPP, // PPP task
#endif
#ifdef SUPPORT_KEY_SCAN
TASK_KEY, // Key scan task
#endif
#ifdef GLOBAL_TIMER_TASK
TASK_TIMER, // Gobal Timer Task
#endif
TASK_NETWORK_INDICATOR, // network activity indicator task
TASK_DATA_SOCKET, // data socket task
#ifdef SUPPORT_LOW_POWER
TASK_LOW_POWER, // Low power task
#endif
TASK_IKS_CLIENT,
0, // end of single configuration
// insert more node configurations here if required
0 // end of configuration list
};
const UTASKTABLEINIT ctTaskTable[] = {
// task name, task routine, input queue size, start delay, period, initial task state
#ifdef _HW_SAM7X
{ "Wdog", fnTaskWatchdog, NO_QUE, (DELAY_LIMIT)( 0.2 * SEC ), (DELAY_LIMIT)( 0.2 * SEC ), UTASKER_STOP}, // watchdog task (Note SAM7X is not allowed to start watchdog immediately since it also checks for too fast triggering!!)
#else
{ "Wdog", fnTaskWatchdog, NO_QUE, 0, (DELAY_LIMIT)( 0.2 * SEC ), UTASKER_GO}, // watchdog task (runs immediately and then periodically)
#endif
#ifdef USE_IP // Warning - start ARP task before Ethernet. If Ethernet messages are received before ARP tabelle is ready there would be an error..
{ "ARP", fnTaskArp, MEDIUM_QUE, (DELAY_LIMIT)(0.05 * SEC), 0, UTASKER_STOP}, // ARP task check periodically state of ARP table
#endif
#ifdef ETH_INTERFACE
{ "Eth", fnTaskEthernet, (HEADER_LENGTH * 12), (DELAY_LIMIT)(0.05 * SEC), 0, UTASKER_STOP}, // ethernet task - runs automatically
#endif
#ifdef USE_TCP
{ "TCP", fnTaskTCP, MEDIUM_QUE, (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, // TCP task checks periodically state of session timeouts (controlled by task itself)
#endif
{ "app", fnApplication, MEDIUM_QUE, (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, // Application - start after Ethernet to be sure we have Ethernet handle
#ifdef USE_BOOTP
{ "BOOTP", fnBootp, SMALL_QUEUE, (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, //
#endif
#ifdef USE_DHCP
{ "DHCP", fnDHCP, SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, // delay only for timer queue space
#endif
#ifdef USE_DNS
{ "dNS", fnDNS, SMALL_QUEUE, (DELAY_LIMIT)(0.05 * SEC), 0, UTASKER_STOP}, // start before application calls a search
#endif
#ifdef USE_POP3
{ "POP", fnPOP3, SMALL_QUEUE, (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, //
#endif
#ifdef USE_SMTP
{ "SMTP", fnSmtp, SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, //
#endif
#ifdef USE_TFTP
{ "tFTP", fnTftp, SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, //
#endif
#ifdef USE_SNMP
{ "MsnMp", fnSNMP, SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, //
#endif
#ifdef USE_PPP
{ "Uart_ppp", fnPPP, SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, //
#endif
#ifdef SUPPORT_LCD
{ "LCD", fnLCD, MEDIUM_QUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, //
#endif
#ifdef SUPPORT_ADC
{ "cDA", fnADC, NO_QUE, (DELAY_LIMIT)(2.0 * SEC), (DELAY_LIMIT)(0.05 * SEC), UTASKER_STOP}, //
#endif
#ifdef SUPPORT_KEY_SCAN
{ "Key", fnKey, NO_QUE, (DELAY_LIMIT)(0.1 * SEC), (DELAY_LIMIT)(0.1 * SEC), UTASKER_STOP}, //
#endif
#ifdef GLOBAL_TIMER_TASK
{ "period", fnTimer, SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, //
#endif
#ifdef USE_MAINTENANCE
{ "maintenace",fnDebug, SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, // Task used for debug messages (started by application)
#endif
#ifdef LAN_REPORT_ACTIVITY
{ "NetInd", fnNetworkIndicator,LARGE_QUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, // Network activity task
#endif
#ifdef SUPPORT_LOW_POWER
{ "lowPower", fnLowPower, NO_QUE, 0, 0, UTASKER_GO}, // Low power task
#endif
{ "I", fnIKSClient, MEDIUM_QUE, (DELAY_LIMIT)(0.20 * SEC), 0, UTASKER_STOP},
{ 0 }
};
#endif // end of task configuration