Thanks.
I use the command SplitControl.start() implemented in ActiveMessageC, and it
seems working fine now.
Bo Zhu
On Wed, Dec 3, 2008 at 1:26 AM, Philip Levis <[EMAIL PROTECTED]> wrote:
>
> On Dec 2, 2008, at 3:25 AM, Bo Zhu wrote:
>
> environment: micaz, tinyos 2.10, mib510, ubuntu 8.10
>>
>> I am trying to write and read some ram data via SPI, and also perform some
>> basic command such as SNOP to get the status of SPI.
>> But what I read from the SPI are all 0xFF, and the status of SPI is always
>> 0xFF.
>> I have used the Resource interface to gain the access of SPI and pull down
>> the CSN, just as follows:
>>
>> event void SpiResource.granted() {
>> cc2420_status_t status;
>>
>> call CSN.clr();
>> status = call SNOP.strobe();
>> call CSN.set();
>> releaseSpiResource();
>>
>> printf("status = %X\n", status);
>> printfflush();
>> }
>>
>> Does anybody know why? Do I miss something important?
>>
>> The attachment of this email is a full project for test (very simple, the
>> main file has only 70 lines).
>> Could some help me take a look or have a try? (make install, run the
>> printf.sh, and reset the micaz mote)
>>
>
> Just a sanity check: is the CC2420 powered up? I haven't looked at your
> code.
>
> Phil
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help