[Tinyos-help] the status of SPI is always 0xFF (have used Resource, CSN interfaces)

Bo Zhu zhubo03 at gmail.com
Tue Dec 2 03:25:05 PST 2008


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)

Thanks in advance.
Bo Zhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20081202/fdf2f7ce/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestRead.zip
Type: application/zip
Size: 1536 bytes
Desc: not available
Url : https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20081202/fdf2f7ce/attachment.zip 


More information about the Tinyos-help mailing list