Dear everyone,

 

  I want to speed up the SPI access so that I could shorten the time used to
read the data from RxFIFO of CC2420 to MCU. Based on my understanding of
TinyOS 2.1.1 system, the clock frequency of SPI is SMCLK/2. Thus I modify
the SMCLK frequency by setting the BCSCTL2 as 0 in function
Msp430ClockInit.defaultInitClocks (at line 94
/tos/chips/msp430/timer/Msp430ClockP.nc). Hopefully, the SMCLK equals to DCO
frequency 4MHz, which is 1MHz before.

 

  I write a small program to test whether this modification works. I read
the data of RxFIFO one byte by one byte. I write a new split-phase SPI
access interface based on FastSpiByte. I signal a readDone event after each
byte is obtained. Then I read the next byte. My payload length is 47. Under
this setting, it consumes about 2250us to finish the data swapping process
with 4MHz SMCLK. It also consumes about 2280us with 1MHz SMCLK.

 

  I am very confused about the results. Is my method of increasing SPI speed
right? Where is the time consumed during the process? Does the split-phase
way slow down the process? It seems the result is much larger than the
expected. Thank you very much in advance.

 

Best Regards

Zhichao Cao

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

Reply via email to