I'd say you are on the right track in modifying the pre-scale clock freq,
but there may be some other module using that timer. You might check
through the code and see if that's the case. I've noticed that the TOS
"documentation" is rather characteristically silent on what internal
controller features are used to what purposes...

I implemented this recently on the mica's but unfortuantely I only know
the ATMEGA controller so I can't help with the details. If it's any help
my code is at: http://www.etantdonnes.com/Motes/AVR128timers.zip

MS


Firat TARAKTAS wrote:
Hi to all,
I want to generate 40 kHz from MSP430F1611 with TinyOS 1.15. I am using compare mode of TimerA2. I set TA2 as compare mode, set an event with CompareA2.setEventFromNow(1000) command and when it is fired CompareA2.setEventFromPrev(1000) is called. I observed 1 kHz signal at the output. Like that when i set the event with 100, i observed 10 kHz signal. According to these results, i expect that approximately 40 kHz signal at output when event is set form now and previous with parameter 12 (25/2). But it is not achieved. With 5 parameter, 33kHz is achieved, but higher frequencies are not. Then after a little survey, I concluded that <tos>\tos\platform\msp430\MSP430ClockM.nc module file is executed while device booting. In "command void MSP430ClockInit.defaultInitClocks()", I set the divisor of SCLK to 1 with BCSCTL2 = 0, in order to increase the clock frequency. But again 1 kHz signal is seen with parameter 1000 while 4kHz is expected.Trials with other parameters do not work. I will be glad, if you lead me to solve this problem.
Firat TARAKTAS

<http://www.genetlab.com/>__


------------------------------------------------------------------------

_______________________________________________
Tinyos-help mailing list
[EMAIL PROTECTED]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[EMAIL PROTECTED]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to