Re: [Tinyos-help] Tiny-Os help :- Compiling scheduler

2012-02-05 Thread Sobit Thapa
On Fri, Feb 3, 2012 at 3:23 PM, Sobit Thapa  wrote:

> Hello,
>
> If you want to know more about TinyOS Scheduler or anything else in
> detail, read Tinyos-scheduler TEP (
> http://www.tinyos.net/tinyos-2.x/doc/html/tep106.html)..Itdescribes 
> how default scheduling policy works and also presents a nice way
> to change it according to your own requirement. There is nice example of
> deadline based  task scheduler. I believe you have to be careful while
> changing these main components.
>
>
> I hope this helps you.
>
> Thanks.
> Regards,
> Sobit Thapa
> Graduate Research Assistant
> Texas State University, San Marcos
>
>
> On Fri, Feb 3, 2012 at 3:00 PM, Eric Decker  wrote:
>
>>
>>
>> On Fri, Feb 3, 2012 at 10:17 AM, Omkar raiker wrote:
>>
>>> hello...
>>>
>>> please .. itz urgent!!
>>>
>>> can any1 suggest me a way 2 compile scheduler of tinyos??
>>>
>>
>> No offense but his is a really strange question.
>>
>> The scheduler already compiles.   The TinyOS scheduler is in
>> tos/system/SchedulerBasicP.nc.
>>
>>
>>>
>>> and i want 2 check hw scheduler file is called and details of execution
>>> with example..
>>>
>>
>> what h/w scheduler are you talking about?
>>
>>
>>  I would strongly suggest you do more research in to what is actually
>> there prior to asking strange questions of the community.
>>
>>
>>>
>>> plz help me..
>>>
>>>
>>>
>>>
>>> ___
>>> Tinyos-help mailing list
>>> Tinyos-help@millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>>
>>
>> --
>> Eric B. Decker
>> Senior (over 50 :-) Researcher
>>
>>
>>
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Question regarding scheduler modification

2011-11-21 Thread Sobit Thapa
Dear all,

I am trying to modify tinyos scheduler. If I use Active message components
in TinyScheduler, it is not compiled. I have made new component and tried
to use it which provides Radio functionality to scheduler. Still, It also
doesn't work and gives same error message when I call from TinyScheduler.

So, is there any way to add Active Message Components and Radio components
in TinyScheduler so that I can distribute task.

Thanks in advance. Following is my error message:

esc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
"*** LOW POWER COMMUNICATIONS DISABLED ***"
In component `HilTimerMilliC.AlarmToTimerC':
/opt/tinyos-2.x/tos/lib/timer/AlarmToTimerC.nc: In function `Alarm.fired':
/opt/tinyos-2.x/tos/lib/timer/AlarmToTimerC.nc(HilTimerMilliC.AlarmToTimerC):71:
fired.postTask not connected
In component `Atm128SpiC.Arbiter.Arbiter':
/opt/tinyos-2.x/tos/system/SimpleArbiterP.nc: In function
`Resource.request':
/opt/tinyos-2.x/tos/system/SimpleArbiterP.nc(Atm128SpiC.Arbiter.Arbiter):77:
grantedTask.postTask not connected
/opt/tinyos-2.x/tos/system/SimpleArbiterP.nc: In function
`Resource.release':
/opt/tinyos-2.x/tos/system/SimpleArbiterP.nc(Atm128SpiC.Arbiter.Arbiter):104:
grantedTask.postTask not connected
In component `CC2420CsmaP':
/opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaP.nc: In function
`CC2420Transmit.sendDone':
/opt/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaP.nc:201:
sendDone_task.postTask not connected
In component `CC2420ReceiveP':
/opt/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc: In function
`RXFIFO.readDone':
/opt/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc:300:
receiveDone_task.postTask not connected
In component `CC2420SpiP':
/opt/tinyos-2.x/tos/chips/cc2420/spi/CC2420SpiP.nc: In function
`Resource.request':
/opt/tinyos-2.x/tos/chips/cc2420/spi/CC2420SpiP.nc:113: grant.postTask not
connected
/opt/tinyos-2.x/tos/chips/cc2420/spi/CC2420SpiP.nc: In function
`Resource.release':
/opt/tinyos-2.x/tos/chips/cc2420/spi/CC2420SpiP.nc:168: grant.postTask not
connected
In component `Atm128SpiP':
/opt/tinyos-2.x/tos/chips/atm128/spi/Atm128SpiP.nc: In function
`SpiPacket.send':
/opt/tinyos-2.x/tos/chips/atm128/spi/Atm128SpiP.nc:256: zeroTask.postTask
not connected


Thanks.

Regards,
Sobit Thapa
Graduate Research Assistant
Texas State University
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] nesc comments

2011-07-15 Thread Sobit Thapa
Hello all,

is there any mechanism to add comments or annotations to user defined
functions to assist other tools when we analyze program in app.c or assembly
level.

 I have found system functions using meaningful sub-routine names in
assembly and clear comments in app.c but naming of user defined functions is
very unclear.

Thank you.

Sobit Thapa
Graduate Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Problem following tutorial's instructions for mote-PC serial communication.

2011-03-30 Thread Sobit Thapa
Hello, I used to solve first problem simply unplugging usb connector and
connecting it again. I dont know the main cause about this.

Second, from your output, your serialPort seems to be working. But, you are
not getting result and results display depends how you display them or may
be your mote did not send any message to PC.

Thanks.
Sobit Thapa
Graduate Research Assistant
Texas State University

On Wed, Mar 30, 2011 at 12:58 PM, Geo Gkolfin  wrote:

> Hello!
> I am trying to follow lesson's 4 instructions (
> http://docs.tinyos.net/index.php/TinyOS_Tutorials#Getting_Started_with_TinyOS
> )
> in order to have my iris mote communicate with the pc over /dev/ttyUSB0
> port.  So, I install the TestSerial application and I try to run:
> *
> *
> *java TestSerial*
>
> **yet what I get is:
>
> *sf@localhost:9002 died - exiting (java.net.ConnectException: Connection
> refused)*
>
> Skipping this step (I do not know what to do) and continuing to the next
> command -just out of curiosity- I try:
>
> *sudo chmod 666 /dev/ttyUSB0*
> *java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:57600*
>
> and that gives me an endless:
>
> *serial@/dev/ttyUSB0:57600: resynchronising*
>
> This only stops mith Ctrl+z. What should I try?
>
> Thank you in advance.
>
>
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Help needed regarding computation time calculation in Microseconds for Atmega128 Processor

2011-03-15 Thread Sobit Thapa
I am using Timer3 as code posted below. I call startCounting() before a task
executes and I call stopCounting after task executes.

But, I am getting variable result. Is there any mistake in my code or
somebody can provide code performing similar job.

#include "printf.h"

uint16_t coarseValues;
uint16_t fineValues;
uint16_t COARSECOMPARE = 0x7FFF;
uint16_t fineOffset = 0x000E;
uint16_t coarseOffset = 0x0021;
uint16_t coarseWasCalled = 0;

module ClockCount
{
   provides
   {
  interface TaskCount as TC;
   }

   uses interface HplAtm128Compare;
}

implementation
{

   async event void HplAtm128Compare.fired()
   {
  TCCR3B = 0x00;
  atomic coarseWasCalled++;
  atomic coarseValues++;
  TCNT3 = 0x; //Counter3 clear
  TCCR3B = 0x09;
   }

   async command void TC.startCounting()
   {
  atomic coarseValues = 0;
  atomic fineValues = 0;

  //Actual Timer/Counter
  TCNT3 = 0x;

  //Set counter clear on match (Couter Control Registers)
  TCCR3A = 0x80;
  TCCR3B = 0x09;
  //Interupt mask set (Extended Timer Interrupt Mask Register)
  ETIMSK = 0x10;

  //Compare values (Output Compare Register)
  OCR3A = COARSECOMPARE;

   }

   void calculateFine()
   {
  uint16_t callOffset = (coarseWasCalled * coarseOffset)/COARSECOMPARE;
  //Was Commented
  atomic coarseValues = coarseValues + callOffset;

  if (coarseWasCalled)
  {
 atomic fineValues = TCNT3 - coarseOffset;
 atomic coarseWasCalled = 0;
  }
  else
  {
 //there is a 13 overhead on running the counter
 atomic fineValues = TCNT3 - fineOffset;
  }
   }

   async command void TC.stopCounting()
   {
  TCCR3B = 0x00;
  calculateFine();
   }

   command unsigned int TC.getCoarseValue() {atomic return coarseValues;}
   command unsigned int TC.getFineValue() {atomic return fineValues; }

   command void TC.setCoarseCompare(uint16_t newCompare)
   {
 COARSECOMPARE = newCompare;
 OCR3A = newCompare;
   }

   command void TC.setFineOffset(uint16_t off)
   {
  atomic fineOffset = off;
   }

   command void TC.setCoarseOffset(uint16_t off)
   {
  atomic coarseOffset = off;
   }

   command void TC.sendValuesToScreen()
   {
  printf("Fine Value is %u:\n", fineValues);
  printf("Coarse Value is %u:\n", coarseValues);
  printfflush();
   }
}
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Question regarding computation cost of a function in MicroSeconds

2011-03-14 Thread Sobit Thapa
Thank you very much Eric.
What I did is Following (Surprisingly, its not working in desired way.)
Can anyone suggest me?

#include "printf.h"

uint16_t coarseValues;
uint16_t fineValues;
uint16_t COARSECOMPARE = 0x7FFF;
uint16_t fineOffset = 0x000E;
uint16_t coarseOffset = 0x0021;
uint16_t coarseWasCalled = 0;

module ClockCount
{
   provides
   {
  interface TaskCount as TC;
   }

   uses interface HplAtm128Compare;
}

implementation
{

   async event void HplAtm128Compare.fired()
   {
  TCCR3B = 0x00;
  atomic coarseWasCalled++;
  atomic coarseValues++;
  TCNT3 = 0x; //Counter3 clear
  TCCR3B = 0x09;
   }

   async command void TC.startCounting()
   {
  atomic coarseValues = 0;
  atomic fineValues = 0;

  //Actual Timer/Counter
  TCNT3 = 0x;

  //Set counter clear on match (Couter Control Registers)
  TCCR3A = 0x80;
  TCCR3B = 0x09;
  //Interupt mask set (Extended Timer Interrupt Mask Register)
  ETIMSK = 0x10;

  //Compare values (Output Compare Register)
  OCR3A = COARSECOMPARE;

   }

   void calculateFine()
   {
  uint16_t callOffset = (coarseWasCalled * coarseOffset)/COARSECOMPARE;
  //Was Commented
  atomic coarseValues = coarseValues + callOffset;

  if (coarseWasCalled)
  {
 atomic fineValues = TCNT3 - coarseOffset;
 atomic coarseWasCalled = 0;
  }
  else
  {
 //there is a 13 overhead on running the counter
 atomic fineValues = TCNT3 - fineOffset;
  }
   }

   async command void TC.stopCounting()
   {
  TCCR3B = 0x00;
  calculateFine();
   }

   command unsigned int TC.getCoarseValue() {atomic return coarseValues;}
   command unsigned int TC.getFineValue() {atomic return fineValues; }

   command void TC.setCoarseCompare(uint16_t newCompare)
   {
 COARSECOMPARE = newCompare;
 OCR3A = newCompare;
   }

   command void TC.setFineOffset(uint16_t off)
   {
  atomic fineOffset = off;
   }

   command void TC.setCoarseOffset(uint16_t off)
   {
  atomic coarseOffset = off;
   }

   command void TC.sendValuesToScreen()
   {
  printf("Fine Value is %u:\n", fineValues);
  printf("Coarse Value is %u:\n", coarseValues);
  printfflush();
   }
}


Thank you..
Regards,
Sobit
Graduate Researcher
Texas State University



On Mon, Mar 14, 2011 at 5:30 PM, Eric Decker  wrote:

>
> I assume you mean computation cost in terms of time.
>
> I haven't messed with the atmel processors in years and currently am
> working with the msp430 processors
> but the concepts are equivilent.
>
> There should be a h/w timer running on the atm128 that should be ticking at
> 1us.   you need to find that
> timer register and figure out how to snapshot it.
>
> Then you take a snapshot at the start of the code you are measuring and
> then another when the computation
> completes.You need to be aware of the width of the timer and be careful
> of overflows which cause problems for
> determining the final result.
>
> eric
>
>
> On Mon, Mar 14, 2011 at 3:14 PM, Sobit Thapa  wrote:
>
>> Hi,
>>
>> I need a help regarding computation cost of a function which I want to
>> read in
>> Micro Second...I need a sample code for Atm128 processor. Can
>> anybody please help me...
>>
>> Its urgent and I appreciate your help.
>>
>> Regards,
>> Sobit
>> Graduate Researcher
>> Texas State University
>>
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Question regarding computation cost of a function in MicroSeconds

2011-03-14 Thread Sobit Thapa
Hi,

I need a help regarding computation cost of a function which I want to read in
Micro Second...I need a sample code for Atm128 processor. Can
anybody please help me...

Its urgent and I appreciate your help.

Regards,
Sobit
Graduate Researcher
Texas State University

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help