Regarding Hardware Timer

Hi All ,

I have configure one hardware timer and testing example hwtimer and hwtimer_spin.

This is working and i just want to verify can you please provide me expected output of these examples . Readme are not available .

Thanks Shishir tiwari

Hi,

these tests print out everything you need to know, but here you go:

$ cd tests/hwtimer
$ make clean all term
...
kernel_init(): This is RIOT! (Version: 2014.12-421-gb6eeb)
kernel_init(): jumping into first task...
hwtimer test application...

  Timers should print "callback x" once when they run out.
  The order for x is 1, n-1, n-2, ..., 2 where n is the number of available hardware timers (4 on this platform).
  In 1 second, one timer should fire every second/100 until all timers have run out.
  Additionally the message "hwtimer set." should be printed once 1 second from now.

Setting timers:

set callback  1
set callback  2
set callback  3

All timers set.

callback  1
hwtimer set.
callback  3
callback  2
$ cd tests/hwtimer_spin
$ make clean all term
...
kernel_init(): This is RIOT! (Version: 2014.12-421-gb6eeb)
kernel_init(): jumping into first task...
This is just a functionality test for hwtimer_spin.

You should see the message "success" after a while if this test was
successful.
If you do not see that message, something went wrong.

success

Cheers, Ludwig

hi,

thanks for reply,

Still we have not disable timer interrupt?? so we will get interrupt every timer expire??

this "callback 1" print continues??

please tell me what need tobe done??

thanks shishir

Hi Shisir,

the log posted by Ludwig shows a hwtimer implementation with 4 timer slots. (In most cases these refer to channels on the silicon timer which can be spread over several silicon modules) Each slot has its own callback getting executed when the below running timer matches the set compare value. In combination the interrupt for this slot has to be disabled. For illustration I note the output of a hardware platform with only two timer slots.

kernel_init(): This is RIOT! (Version: 2014.12-421-gb6eeb)
kernel_init(): jumping into first task…
hwtimer test application…

Timers should print "callback x" once when they run out.
The order for x is 1, n-1, n-2, ..., 2 where n is the number of available hardware timers (4 on this platform).
In 1 second, one timer should fire every second/100 until all timers have run out.
Additionally the message "hwtimer set." should be printed once 1 second from now.

Setting timers:

set callback  1

All timers set.

callback  1
hwtimer set.

After `hwtimer set.` you should not receive any more output from the board.

I hope this helps somehow. If got you wrong or there are any open questions don’t hesitate to contact this list.

Best, Thomas