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
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to