Jump to content

systick related functions


kengineer

Recommended Posts

Hello, just got gfx up and running on a cortex M0+ based microcontroller. I implemented gfxSystemTicks and gfxMillisecondsToTicks functions similar to how suggested here. I didn't however actually use a system systick, but rather enabled an accurate 1 ms timer interrupt in my code, and used this to increment a timer variable. This was easy and quick to setup as I didn't really look too much into how systick works. What I'm wondering, is when should this timer be cleared to 0? Otherwise it's just going to run forever until it overflows. I'm not sure how an actual systick is handled so maybe this usually isn't an issue. Thanks.

Link to comment
Share on other sites

Hello and welcome to the community!

As inmarket mentioned you don't have to worry about that in terms of uGFX as we internally take care of that. However, that is in fact a problem you can never avoid. It's a basic principle (or problem) of counters and the systick has the same problem. This problem needs to be handled manually:

An overflowing systick counter was also the reason why the mouse cursor in Windows 95 stopped working after 47.5 days :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...