Page 1 of 2

MOD54415 Startup Time

Posted: Tue Jan 15, 2019 6:54 am
by DBrunermer
Hi, is there any way to make a 54415 boot faster? Right now it seems to take around 10 seconds. My old 5270/5272 apps went much faster. Can I do anything? Thanks, Dan

Re: MOD54415 Startup Time

Posted: Tue Jan 15, 2019 11:19 am
by TomNB
How are you measuring boot time?

That is a very long time. I would try a couple of tests:
1. Run the MOD5441x Factory Example with no changes in DHCP mode
2. Run the same with a static IP

The only two delays should be the programmed wait time to boot (2 seconds by default) and getting a DHCP Address, which depends on your DHCP server.
How do those compare to your app for boot time?

Re: MOD54415 Startup Time

Posted: Tue Jan 15, 2019 12:04 pm
by DBrunermer
I should have mentioned it's with NNDK 2.7.7

I didn't try that exactly, though I do get the same behavior right out of the box. Or is the factory app and the app it comes with two different apps?

Anyway, my code reads like this

Code: Select all

InitialStack();
EthernetIP = 0xC0A80165 // 192.168.1.101
StartHTTP();
Is there anything different about StartHTTP() on this platform? And I know in the old "auto written code" that there was a compare to the IP to see if GetDHCPAddress should be called or not. Is that call automatic these days when you initialize the stack?

EDIT: Just looking at InitializeStack function prototype. Should I set the IP address in that call, maybe?

Thanks again, Dan

Re: MOD54415 Startup Time

Posted: Tue Jan 15, 2019 12:59 pm
by TomNB
Hi Dan,

Just so we can match testing, how are you measuring boot time?

Re: MOD54415 Startup Time

Posted: Wed Jan 16, 2019 5:54 am
by DBrunermer
I'm sorry, Tom, I thought I answered that. I think I typed a reply yesterday and forgot to hit submit.

OK, so on my setup, basically I just watch the boot messages coming over the RS232 port. It goes like this:
Turn on power / stopwatch
The 'press A' message appears almost immediately
At 9.4s I get the 'Waiting for connection on port 23' message inside TcpServerTask

Just to make sure this wasn't a perception, I did the same experiment with a 5272 running almost identical code, but I get the 'Waiting for...' message at 4.1-4.2s

I should mention, the 5272 code was compiled with the 2.4.2 toolkit, and the 54415 code was compiled using 2.7.7 (if that matters).

Is the RAM initialized? I mean, could I just be looking at the difference between clearing 8MB of memory and 64MB?
Thanks again, Dan

Re: MOD54415 Startup Time

Posted: Wed Jan 16, 2019 10:32 am
by pbreed
First use IPSETUP to set your static IP address....
Setting it the way you are doing might is causing it to start DHCP.

What is your monitor version? )Hit A to abort then type version)

Is your boot delay set to 0? (If you do this first you won't see monitor version)
(The fact you see the hit A to abort says it is not set to zero)
With the MOD54415 since it has the recovery jumper its safe to set the boot delay to 0.

Re: MOD54415 Startup Time

Posted: Thu Jan 17, 2019 6:05 am
by DBrunermer
OK, I'll give that a try. I don't explicitly call GetDHCPAddress anywhere, so I thought it wouldn't affect me. Let me ask this. If I start a new project and don't include DHCP support, would that prevent it?

Re: MOD54415 Startup Time

Posted: Thu Jan 17, 2019 6:57 am
by pbreed
On 2.7.x it won't start DHCP, later versions may be differnt.

In your start up code you left off an importatnt step...
Your running at very high priority, likely blocking other stuff going on...

OSChangePrio( MAIN_PRIO );


So do the following:
Set a static address using either the monitor and setup command or ipsetup.
Set your boot delay to 0
then
Your init code should be:

InitializeStack();
OSChangePrio( MAIN_PRIO );
StartHTTP();

Re: MOD54415 Startup Time

Posted: Thu Jan 17, 2019 6:58 am
by pbreed
Just to be 100% clear this is a MOD54415 not a Nano54415?

The Nano54415 slow boot may be a monitor version issue.

Re: MOD54415 Startup Time

Posted: Thu Jan 17, 2019 7:14 am
by DBrunermer
Re: the last, it's the MOD not the Nano. And I do have that line in there, I just didn't put it in the snippet. But you know what, it is later than what you have here. I'll try reordering that too. Should EnableAutoUpdate() be before or after OSChangePrio(MAIN_PROP)?