Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to add Simple Timer to a project?

Where are the instructions detailing the process for adding the Simple Timer library to an existing (Keil) project?

Parents Reply Children
  • 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!

Related