At the completion of programming a Nano module using Autoupdate, v2.5, the following message is output on the serial port:
TcpUpdate Error: 40
The module is programmed correctly and runs as expected. I have detected nothing wrong. What does that message mean?
The applications are built with v2.9.5 of the tools.
TcpUpdate Error
Re: TcpUpdate Error
I don't see the string "TcpUpdate Error:" anywhere in our code. Is that something in your app?
-
- Posts: 634
- Joined: Mon May 12, 2008 10:55 am
Re: TcpUpdate Error
Well, this is embarrassing. It is in my code. It's generated when function StartTcpUpdate returns a non-zero value, which in this case is 40.
-
- Posts: 634
- Joined: Mon May 12, 2008 10:55 am
Re: TcpUpdate Error
StartTcpUpdate just calls OSTaskCreatewName, and returns the value returned by OSTaskCreatewName. But the uCosLibrary document doesn't define any return values.
-
- Posts: 634
- Joined: Mon May 12, 2008 10:55 am
Re: TcpUpdate Error
It turns out the return code for OSTaskCreatewName is defined in OSTaskCreate. And error code of 40 mean the task priority is already used.
These are my priorities:
I don't see a conflict with the priorities defined in constants.h. Is priority 49 used somewhere else?
These are my priorities:
Code: Select all
#define USERMAIN_PRIO (55)
#define NTP_TASK_PRIO (54)
#define UDP_TASK_PRIO (53)
#define SNMP_PRIO (52)
#define FTP_TASK_PRIO (51)
#define TCPUPDATE_PRIO (49)
#define SSL_REPRO_PRIO (48)
Re: TcpUpdate Error
Its not used by the system anywhere else. What do you get if you add TCP update to an example like SimpleHtml?
Re: TcpUpdate Error
If you have any of your tasks at MAIN_PRIO-1, that would be 49