Difference between revisions of "Platforms telosb"
(→Dependencies) |
|||
Line 13: | Line 13: | ||
===Dependencies=== |
===Dependencies=== |
||
You should have |
You should have the latest msp430-gcc toolchain installed. |
||
===Other notes=== |
===Other notes=== |
Revision as of 21:59, 1 September 2010
In MansOS, "telosb" is a platform supporting certain hardware based on msp430F1611 processor. The following platforms have been tested in MansOS using this platform:
- TelosB,
- Tmote Sky,
- Tmote Mini
Compile example
make telosb
Upload example
make telosb upload
Dependencies
You should have the latest msp430-gcc toolchain installed.
Other notes
Schematics and some data is available on TinyOS.net:
Telosb initialization in TinyOS 1.x
Sets all pin directions and values. Inits the external flash memory chip.
void TOSH_SET_PIN_DIRECTIONS(void){
atomic {
P1SEL = 0; // Select all ports to be I/O pins
P2SEL = 0;
P3SEL = 0;
P4SEL = 0;
P5SEL = 0;
P6SEL = 0;
P1DIR = 0xe0; // 1110 0000 (0=input, 1=output)
P1OUT = 0x00; // 0000 0000
P2DIR = 0x7b; // 0111 1011 (0=input, 1=output)
P2OUT = 0x10; // 0001 0000
P3DIR = 0xf1; // 1111 0001 (0=input, 1=output)
P3OUT = 0x00; // 0000 0000
P4DIR = 0xfd; // 1111 1101 (0=input, 1=output)
P4OUT = 0xdd; // 1101 1101
P5DIR = 0xff; // 1111 1111 (0=input, 1=output)
P5OUT = 0xff; // 1111 1111
P6DIR = 0xff; // 1111 1111 (0=input, 1=output)
P6OUT = 0x00; // 0000 0000
P1IE = 0; // Port P1 pin interrupts - all disabled
P2IE = 0; // Port P2 pin interrupts - all disabled
TOSH_uwait(1024*10); // wait 10ms for the flash to startup
TOSH_FLASH_M25P_DP(); // Put the flash in deep sleep state
}//atomic
}