996 views
in GUI Development by
I set Time (Clock) in my project.

 

1 min = 60 sec

but this time change about 45 sec to 1min.

why does time change different??

Is it system clcok configuration?

2 Answers

0 votes
by
Hi,

normally the time base for the MCU in all comes from an internal or external oscillator.

I do not know if you are using an eval board from an chip manufacturer or an custom board.

But in case that you are using a custom board I would check the oscillator unit.

Otherwise can you verify that your software settings for the system clock has not been change while the code was running?
0 votes
by

Hi

If you are using a timer and this timer fires the event after 45 seconds instead of 60 seconds: Check the systick given to Embedded Wizard. In the "ewextrte.c":

unsigned long EwGetTicks ( void )
{
  return EmWiSystemTicks;
}

Make sure this tick counter ("EmWiSystemTicks) is set appropriately. You have to do this. If this tick counter is faster than 1ms (by about 25%) you will have a timer of 60 seconds fire the event 15 seconds too early like in your example.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...