Clock, TICKS_PER_SECOND, etc VERY Slow
Posted: Mon Mar 31, 2014 2:03 pm
Using MOD54415 out of the box.
Running this simple program and output is almost 30 seconds instead of expected 10. Any ideas why?
void UserMain(void * pd) {
InitializeStack();
if (EthernetIP == 0) GetDHCPAddress();
OSChangePrio(MAIN_PRIO);
EnableAutoUpdate();
iprintf("Application started\n");
int ten_seconds_counter = 0;
while (1) {
OSTimeDly(TICKS_PER_SECOND);
if (++ten_seconds_counter==10) {
ten_seconds_counter = 0;
iprintf("Ticks=%d, Secs=%d, TPS=%d\r\n", TimeTick, Secs, TICKS_PER_SECOND);
}
}
}
OUTPUT:
Application started
Ticks=500, Secs=10, TPS=50
Ticks=1000, Secs=20, TPS=50
Ticks=1500, Secs=30, TPS=50............
Running this simple program and output is almost 30 seconds instead of expected 10. Any ideas why?
void UserMain(void * pd) {
InitializeStack();
if (EthernetIP == 0) GetDHCPAddress();
OSChangePrio(MAIN_PRIO);
EnableAutoUpdate();
iprintf("Application started\n");
int ten_seconds_counter = 0;
while (1) {
OSTimeDly(TICKS_PER_SECOND);
if (++ten_seconds_counter==10) {
ten_seconds_counter = 0;
iprintf("Ticks=%d, Secs=%d, TPS=%d\r\n", TimeTick, Secs, TICKS_PER_SECOND);
}
}
}
OUTPUT:
Application started
Ticks=500, Secs=10, TPS=50
Ticks=1000, Secs=20, TPS=50
Ticks=1500, Secs=30, TPS=50............