[Tinyos-help] bug in MSP430TimerM and MSP430TimerP
Tie Luo
tieluo at gmail.com
Fri Nov 10 05:11:25 PST 2006
If this is really a bug, where should be modified in Tinyos 2?
On 11/10/06, decesco at cab.cnea.gov.ar <decesco at cab.cnea.gov.ar> wrote:
>
> Hi,
>
> I tried to use the inputdivider function to set the prescaler for the
> timer and it didnt work. I check the implementation and I believe I should
> be change from
>
> async command void TimerA.setInputDivider( uint16_t inputDivider )
> {
> TACTL = (TACTL & ~(ID_1|ID_3)) | ((inputDivider << 8) & (ID_1|ID_3));
> }
>
> to
>
> async command void TimerA.setInputDivider( uint16_t inputDivider )
> {
> TACTL = (TACTL & ~(ID_1|ID_3)) | ((inputDivider << 6) & (ID_1|ID_3));
> }
>
> the difference is in the shift operation, note 6 is the first bit
> corresponding to input divider in Timer control register.
>
> It worked with this change
>
> -Bill
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
Regards,
Tie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061110/5e35c8fa/attachment.htm
More information about the Tinyos-help
mailing list