[Tinyos-help] SetRFPower micaz TinyOs 1.x

Kocsis László kocsis82 at freemail.hu
Tue Nov 7 15:04:20 PST 2006


Hi!

I find a mistake that may result the problem.
In xbow/tos/lib/CC2420RadioAck/CC2420ControlM

SetRFPower:
 gCurrentParameters[CP_TXCTRL] = (gCurrentParameters[CP_FSCTRL] & 0xfff0) | (power << CC2420_TXCTRL_PAPWR);
I think the right hex is 0xff00 instead of 0xfff0, so I get the RFindex at 5 bits instead of 4, and can count until 31 insead of 15

GetRFPower:
 return (gCurrentParameters[CP_TXCTRL] & 0x000f); //rfpower; 
I think the right hex is 0x00ff instead of 0x000f, so I get the RFindex at 5 bits instead of 4, and can count until 31 insead of 15

It is working seemingly.
Do you think it is the right solving and so there is a mistake at TinyOS 1.x?

Thanks,
Laci


  ----- Original Message ----- 
  From: Kocsis László 
  To: tinyos-help at Millennium.Berkeley.EDU 
  Sent: Saturday, November 04, 2006 4:05 PM
  Subject: [Tinyos-help] SetRFPower micaz TinyOs 1.x


  Hi All!

  I'm useing micaz, MIB520 programmer and TinyOS 1.x

  I tried to set the RF power by this code:

  uint8_t set_power;
  set_power = 15;
  call CC2420Control.SetRFPower(set_power);

  using call CC2420Control.GetRFPower(); 
  I monitoring the getted power by MessageCenter, but I see, only can set the power index between 1 to 15 insted of 1 to 31. If I try to set  - for example - 25, it set a random index for example: 9 or 4. 
  Does somebody know why?

  What will be happen when I try to set higher index, than the battery can make (because the battery is too low already)? (Do not set and leave the last index??)

  Thanks!

  Laci 



  __________ NOD32 1.1853 (20061103) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com



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


  _______________________________________________
  Tinyos-help mailing list
  Tinyos-help at Millennium.Berkeley.EDU
  https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

  __________ NOD32 1.1853 (20061103) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061108/df0e4d5b/attachment.htm


More information about the Tinyos-help mailing list