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
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to