942 views
in Platform Packages by
Hello All!

I am using a Raspberry Pi model 3A+ for a project and I am having some timing issues. Basically I need to make an accurate stopwatch to 1/100th of a second, but when I set the timer to pulse every 10ms it is not even close.

How does EW know what clock speed the processor is running at? I have also just purchased a Real Time Clock specifically for a Raspberry Pi which works through i2c and has its own python code, but I'm not sure how to implement this within Embedded wizard.

Even without the Real Time Clock, does anyone know why my timer accuracy is over 25% out?

Hope you guys can help.

Regards, Jono

2 Answers

0 votes
by
Hi again,

On another note, I noticed that if I change the timer from 10ms to 100ms, I have a pretty accurate timer (obviously only 0.1sec resolution though)

Regards, Jono
0 votes
by

Hi Jono,

according to your description I assume that you try to use a Timer within your GUI application to create a stopwatch with millisecond accuracy. Please note, that expiring timers are processed within the GUI update cycle, the so called main loop.

Timer objects within Embedded Wizard are intended to be used for GUI animations to trigger a certain action after a desired time period. These are not realized by separate hardware timers.

In order to access time functions from the standard C library or from your own API you can use native code within your GUI project.

Best regards,

Manfred.

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

...