[riot-devel] vtimer on msp430

Milan Babel babel at inf.fu-berlin.de
Wed May 22 12:00:49 CEST 2013


Hi,

I am working at the moment on a port of RIOT to the wsn430, a sensor 
node developed by INRIA. 1024 nodes of this type can be used by their 
senslab (http://senslab.info).

This node is driven by a msp430f1611 which is really close to the 
msp430f1612 used in the msp-430h.
I got already a working Hello-World and a shell, but now I have troubles 
with the vtimer.

The hwtimer seems to work ok, when using hwtimer_wait(1000*1000) for 
1sec or hwtimer_wait(1000*1000*10) for 10sec.

But whenever I use vtimer_sleep the thread never gets back.
As soon as I init vtimer I see an Interrupt for timer 2 fired every ~35 
ticks.

Before I set the vtimer_sleep I will output the current time.
vtimer, NOW : 4096 199022815

When I try to use vtimer_sleep for 1 sec I get:
vtimer_set(): New timer. Offset: 1 0
vtimer_set(): Absolute: 20480 995892037
vtimer_set(): NOW: 32768 1591793952
vtimer_set(): setting long_term

The printf for the vtimer_now is executed right after the output of the 
absolute.

A second thread wich was paused 1sec with the hwtimer_wait() and started 
before the vtimer_sleep says
2nd THREAD: vtimer, NOW : 6987776 135797637

I am really unsure what the problem could be. In general the timer 
should work on the msp430f1611 the same way it works on the msp430f1612. 
I hope I set the ACLK the right way, but if it would be that high 
hwtimer_wait would not really pause a thread.

Regards,
   Milan


More information about the devel mailing list