Hi Janos

Thanks!

Yes, I'm using MoteWorks and the version of it is 2.0F.  Well, I do looked at 
lesson_7 and copied the routine how they're using the flash except for they 
don't call any command in the event:
      AllocationReq.requestProcessed
While I called the leds to turn on. Also, they required much less space than I 
did. but since the flash has 512K bytes and I only required about 50K bytes it 
should be OK.

So can you give me some detailed instructions?

Thanks

Zhen Li
________________________________
From: Janos Sallai [EMAIL PROTECTED]
Sent: Thursday, September 18, 2008 12:43 PM
To: Li, Zhen Li; Tinyos-Help
Subject: RE: [Tinyos-help] Problems in using Flash

I suspect that you use MoteWorks. Please take a look at tutorials/lesson_7, 
which demonstrates how to log to the external flash.

Janos

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Li, Zhen Li
Sent: Thursday, September 18, 2008 11:41 AM
To: Tinyos-Help
Subject: [Tinyos-help] Problems in using Flash

Hi everyone

I want to log some data in the 512K on board flash on the IRIS mote and the 
component I'm using is ByteEEPROM. My wirings are as:

  SensorNodeM.AllocationReq -> ByteEEPROM.AllocationReq[BYTE_EEPROM_ID];
  SensorNodeM.ReadData->ByteEEPROM.ReadData[BYTE_EEPROM_ID];
  SensorNodeM.WriteData->ByteEEPROM.WriteData[BYTE_EEPROM_ID];

In the Module, I have:

  uses {
   ...
   interface AllocationReq;
   interface WriteData;
   interface ReadData;
  ...
  }

  implementation {

   uint32_t req_mem = 50420*sizeof(uint8_t);

   command result_t StdControl.init() {
      call AllocationReq.request(req_mem);
      ...
    }

   event result_t AllocationReq.requestProcessed(result_t success) {
      if (success) call Leds.redOn();
      else call Leds.yellowOn();
      return SUCCESS;
    }
...
  }

There was no error when compiling and only a warning concerning of req_mem  as: 
decimal constant is so large that it is unsigned.
Based on the code, I think no matter the memory request procedure is successful 
or not, one of the LEDs should be on. However, none of them will turn on. So 
can anyone tell me where is the problem?

Thanks !

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.6.20/1666 - Release Date: 9/18/2008 9:01 
AM
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to