Where are the instructions detailing the process for adding the Simple Timer library to an existing (Keil) project?
Where are the instructions detailing the process for adding the Simple Timer library to an existing (Keil) project?
app_timer is always the easiest way for low speed timers (>10msec or so up to the limit of the sys_tick counter which is normally hours).
There are many resources on it. Here is a recent discussion: devzone.nordicsemi.com/.../132548
app_timer is always the easiest way for low speed timers (>10msec or so up to the limit of the sys_tick counter which is normally hours).
There are many resources on it. Here is a recent discussion: devzone.nordicsemi.com/.../132548
No, that really doesn't document the process of adding to an existing project.
It's supposed to be a Simple Timer - but adding it seems to be anything but simple!
Why is this not just clearly documented in the SDK?
Why do we have to go trawling through the forum to find out how to actually use the SDK components?
This seems the closest - thought not actually for the Simple (sic) Timer:
https://devzone.nordicsemi.com/tutorials/b/software-development-kit/posts/application-timer-tutorial
The Application Timer is the app_timer. Hence the name.
That's as easy as it gets in C on a microcontroller.
I'm talking about this:
http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_simple_timer.html
Using it once it's in the project isn't the problem - it's adding it to the Project in the first place that seems to be an absolute pain.
The Simple Timer example uses a driver to simplify the interface to the hardware timer registers and then forces one to deal with all the code in an ISR that the Application Timer takes care of for your.
You will find simple timer to be much, much more complicated than app_timer.
Just read through the link I sent you for app timer. I put some example code in there and reduced the whole process to just a few lines of init stuff and an interrupt handler. The app_timer works by calling your handler at the time interval you specify, either single shot or repeated.
With the app_timer, there are no structs, no interrupt vectors, and no hardware registers to deal with.
So, you just put stuff in the handler, init the timer and voila!
This explanation needs to be placed in the documentation found in infocentre.nordicsemi.
I've now wasted far too many hours trying to include Simple Timer in my existing application.
All I wanted was a once off trigger, which is demonstrated in the Simple Timer example.
Unfortunately, including Simple Timer causes more problems that it's worth.
SO my suggestion is... either remove this example from the formal example list or add in warnings + better instruction as above... or change the name of this example.
No developer likes this current scenario!