Difference between revisions of "CC2420 Cross-Platform Portability"

From TinyOS Wiki
Jump to: navigation, search
m
 
(One intermediate revision by one other user not shown)
Line 20: Line 20:
 
   interface GpioInterrupt as InterruptCCA;
 
   interface GpioInterrupt as InterruptCCA;
 
   interface GpioInterrupt as InterruptFIFOP;
 
   interface GpioInterrupt as InterruptFIFOP;
 +
 +
We recommend you look at the telos and micaz platform chip code for examples on what configuration files to provide and how the functionality is wired in.
  
 
The GpioCapture interface is tied through the Timer to provide a relative time
 
The GpioCapture interface is tied through the Timer to provide a relative time
Line 32: Line 34:
 
= See Also =
 
= See Also =
 
* [[CC2420]]
 
* [[CC2420]]
 +
[[Category:CC2420]]

Latest revision as of 21:31, 25 November 2009

To port the CC2420 radio to another platform, the following interfaces need to be implemented:

 // GPIO Pins
 interface GeneralIO as CCA;
 interface GeneralIO as CSN;
 interface GeneralIO as FIFO;
 interface GeneralIO as FIFOP;
 interface GeneralIO as RSTN;
 interface GeneralIO as SFD;
 interface GeneralIO as VREN;
   
 // SPI Bus
 interface Resource;
 interface SpiByte;
 interface SpiPacket;
 
 // Interrupts
 interface GpioCapture as CaptureSFD;
 interface GpioInterrupt as InterruptCCA;
 interface GpioInterrupt as InterruptFIFOP;

We recommend you look at the telos and micaz platform chip code for examples on what configuration files to provide and how the functionality is wired in.

The GpioCapture interface is tied through the Timer to provide a relative time at which the interrupt occurred. This is useful for timestamping received packets for node synchronization.

If the CC2420 is not connected to the proper interrupt lines, interrupts can be emulated through the use of a spinning task that polls the GPIO pin. The MICAz implementation, for example, does this for the CCA interrupt.

See Also