TcpUpdate Error

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 634
Joined: Mon May 12, 2008 10:55 am

TcpUpdate Error

Post by SeeCwriter »

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.
User avatar
TomNB
Posts: 596
Joined: Tue May 10, 2016 8:22 am

Re: TcpUpdate Error

Post by TomNB »

I don't see the string "TcpUpdate Error:" anywhere in our code. Is that something in your app?
SeeCwriter
Posts: 634
Joined: Mon May 12, 2008 10:55 am

Re: TcpUpdate Error

Post by SeeCwriter »

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.
SeeCwriter
Posts: 634
Joined: Mon May 12, 2008 10:55 am

Re: TcpUpdate Error

Post by SeeCwriter »

StartTcpUpdate just calls OSTaskCreatewName, and returns the value returned by OSTaskCreatewName. But the uCosLibrary document doesn't define any return values.
SeeCwriter
Posts: 634
Joined: Mon May 12, 2008 10:55 am

Re: TcpUpdate Error

Post by SeeCwriter »

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:

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)
I don't see a conflict with the priorities defined in constants.h. Is priority 49 used somewhere else?
User avatar
TomNB
Posts: 596
Joined: Tue May 10, 2016 8:22 am

Re: TcpUpdate Error

Post by TomNB »

Its not used by the system anywhere else. What do you get if you add TCP update to an example like SimpleHtml?
User avatar
TomNB
Posts: 596
Joined: Tue May 10, 2016 8:22 am

Re: TcpUpdate Error

Post by TomNB »

If you have any of your tasks at MAIN_PRIO-1, that would be 49
Post Reply