WSN430

OpenWSN support

The WSN430 is fully supported in OpenWSN.The OpenWSN builders build the WSN430 firmware nightly:

Support for WSN430v13b is EXPERIMENTAL. WSN430v14 is fully supported.

The WSN430 mote

Versions

The WSN430 features a MSP430 micro-controller and a radio. There are two versions of the board:

  • the WSN430 1.3b features a CC1100 radio, which communicates at 868MHz

  • the WSN430 1.4 features an IEEE802.15.4-compliant CC2420 radio, communicating in the 2.4GHz ISM frequency band

Both versions are supported by OpenWSN.

WSN430v13b

WSN430v14

Components

  • MSP430F1611 microcontroller (16bit, 48 kb flash, 10kB RAM)

  • CC1101 or CC2420 radio chip (depending on version)

  • TSL2550 light sensor

  • DS1722 temperature sensor

  • M25P80 external flash memory (1 MB)

  • 3,7V battery (830 mAh)

Datasheets, Schematics and Resources

Although the board is fully supported by OpenWSN, the WSN430 board is NOT developed by the OpenWSN team. Below are links to the official WSN430 documentation, as well as additional resources we find useful:

The datasheets

and schemetics of the board are:

  File Modified

PDF File cc1101.pdf

Sept 11, 2013 by Adilla Susungi

PDF File cc2420.pdf

Sept 11, 2013 by Adilla Susungi

PDF File msp430f1611.pdf

Sept 11, 2013 by Adilla Susungi

PDF File MSP430x1xx_family.pdf

Sept 11, 2013 by Adilla Susungi

PDF File 3-wsn430-v1.4-schema.pdf

Aug 02, 2014 by Thomas Watteyne

PDF File wsn430-dock-patch.pdf

Aug 02, 2014 by Thomas Watteyne

PDF File wsn430-dock.pdf

Aug 02, 2014 by Thomas Watteyne

PDF File 3-wsn430-v1.3b-schema.pdf

Aug 02, 2014 by Thomas Watteyne

File stencil_wsn430_dock.vsd

Aug 02, 2014 by Thomas Watteyne

PDF File stencil_wsn430_dock.pdf

Aug 02, 2014 by Thomas Watteyne

Kickstart

This section documents how to load firmware into the WSN430.

This guide was prepared using the following:

Many (perfectly working) alternatives exist. Some are listed in the "Alternate Tools" section below.

Are you using another set of tools? Add a comment to this page!

Connect the Hardware

 

Make sure to use following jumper settings:

  • On the WSN430 1.3b, put the JP5 on the "batt" position
  • On the "WSN430 JTAG adaptor" board, close the JP6 jumper

Build the Binary

01bsp_leds_prog.ihex
~$ sudo apt-get install scons
[...]
~$ cd Desktop/
~/Desktop$ mkdir openwsn
~/Desktop$ cd openwsn/
~/Desktop/openwsn$ git clone https://github.com/openwsn-berkeley/openwsn-fw.git
[...]
~/Desktop/openwsn$ cd openwsn-fw/ 
~/Desktop/openwsn/openwsn-fw$ scons board=wsn430v13b toolchain=mspgcc bsp_leds
scons: Reading SConscript files ...
 ___                 _ _ _  ___  _ _ 
| . | ___  ___ ._ _ | | | |/ __>| \ |
| | || . \/ ._>| ' || | | |\__ \|   |
`___'|  _/\___.|_|_||__/_/ <___/|_\_|
     |_|                  openwsn.org
scons: done reading SConscript files.
scons: Building targets ...
Compiling firmware/openos/projects/common/01bsp_leds/01bsp_leds.o
Linking   firmware/openos/projects/common/01bsp_leds_prog
msp430-size firmware/openos/projects/common/01bsp_leds_prog
   text	   data	    bss	    dec	    hex	filename
   2936	      0	     38	   2974	    b9e	firmware/openos/projects/common/01bsp_leds_prog
msp430-objcopy --output-target=ihex firmware/openos/projects/common/01bsp_leds_prog firmware/openos/projects/common/01bsp_leds_prog.ihex
msp430-objcopy --output-target=binary firmware/openos/projects/common/01bsp_leds_prog firmware/openos/projects/common/01bsp_leds_prog.bin
scons: done building targets.
test_leds_xtal.ihex
~$ cd /home/user/Desktop/openwsn/openwsn-fw/firmware/openos/bootloader/telosb/
~/Desktop/openwsn/openwsn-fw/firmware/openos/bootloader/telosb$ ls
bsl  lib  readme.txt  test_leds_xtal.ihex

 

To test thing, you can use one of the following binaries:

  File Modified

File 01bsp_leds_prog.ihex LEDs blink fast

Jul 05, 2014 by Thomas Watteyne

File test_leds_xtal.ihex LEDs blink slow

Jul 05, 2014 by Thomas Watteyne

Load and Run

Oops!

Before you can go on, you need to install the required tools to load and debug code in the MSP430:

$ sudo apt-get install gcc-msp430 msp430-libc msp430mcu mspdebug

Oops!

If you're using the MSP430-JTAG by Olimex, it connects to your computer's parallel port. You need to allow the mpsdebug tool to access that parallel port (in our case /dev/parport1).

List the available parallel ports:

$ ls -l /dev/parport*
crw-rw---- 1 root lp 99, 0 juil. 2 09:40 /dev/parport0
crw-rw-rw- 1 root lp 99, 1 juil. 2 09:40 /dev/parport1

Grant read/write access to the parallel port your MSP430-JTAG is connected to

$ sudo chmod 666 /dev/parport1


Using the following commands, you will:

  • launch mspdebug on the parallel port
  • load and run the 01bsp_leds_prog.ihex binary image
  • load and run the test_leds_xtal.ihex binary image
 See commands...
$ sudo mspdebug -j -d /dev/parport1 pif
MSPDebug version 0.21 - debugging tool for MSP430 MCUsCopyright (C) 2009-2012 Daniel Beer <dlbeer@gmail.com>This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
Starting JTAG
JTAG ID: 0x89
Chip ID: F16C
Chip ID data: f1 6c
 
Available commands:
= erase isearch opt run setwatch_w
alias exit load power save_raw simio
break fill load_raw prog set step
cgraph gdb locka read setbreak sym
delbreak help md regs setwatch verify
dis hexout mw reset setwatch_r

verify_raw
 
Available options:
color gdb_loop iradix
fet_block_size gdbc_xfer_size quiet
 
Type "help <topic>" for more information.
Press Ctrl+D to quit.
 
(mspdebug) load ~/Desktop/01bsp_leds_prog.ihex
 
Writing 2904 bytes at 4000...
Writing 32 bytes at ffe0...
Done, 2936 bytes total
(mspdebug) run
Running. Press Ctrl+C to interrupt...
^C
( PC: 001fe) ( R4: 00030) ( R8: 00030) (R12: 0110c)
( SP: 038f2) ( R5: 05a88) ( R9: 00001) (R13: 00034)
( SR: 00004) ( R6: 00005) (R10: 030c0) (R14: 0eb64)
( R3: 00000) ( R7: 00000) (R11: 00000) (R15: 00047)
0x01fe:
001fe: 0c 96 CMP R6, R12
00200: 00 00 BRA @PC
00202: 00 00 BRA @PC
00204: 00 00 BRA @PC
00206: 00 00 BRA @PC
00208: 00 00 BRA @PC
0020a: 00 00 BRA @PC
0020c: f1 38 JL 0x03f0
(mspdebug) erase
Erasing...
(mspdebug) reset
(mspdebug) load ~/Desktop/test_leds_xtal.ihex
Writing 174 bytes at 4000...
Writing 2 bytes at ffec...
Writing 2 bytes at fffe...
Done, 178 bytes total
(mspdebug) run
Running. Press Ctrl+C to interrupt...
^C
( PC: 04070) ( R4: 00030) ( R8: 00030) (R12: 0110c)
( SP: 038fe) ( R5: 05a88) ( R9: 00001) (R13: 00034)
( SR: 000d9) ( R6: 00005) (R10: 030c0) (R14: 0eb64)
( R3: 00000) ( R7: 00000) (R11: 00000) (R15: 00047)
0x4070:
04070: 60 01 32 d0 MOVA SP, &0xd032
04074: d8 00 CMPA PC, R8
04076: 0c 43 CLR R12
04078: 30 41 RET
0407a: 0d 12 PUSH R13
0407c: 0c 12 PUSH R12
0407e: 0f 12 PUSH R15
(mspdebug) exit
$ 

 

Video

running 01bsp_leds_prog.ihexrunning test_leds_xtal.ihex

 

Alternate Tools

This guide was completed successfully with the following combinaiton of tools and boards:

The following diagram indicates the connections used:

IoT-LAB Testbed Support

IoT-LAB is a large-scale open wireless sensor network testbed operated by the French CNRS and INRIA research institutions. It features 2728 low-power sensor motes deployed in 6 different research centers throughout France. Among these 2728 motes, over 1000 are WSN430 boards.

 

An IoT-LAB node consists of 3 interconnected boards:

 

  • The "Open Node", a WSN430 fully programmable by the user (the board closest to us in the picture above)
  • The "Gateway" the board which connects the WSN430 to the IoT-LAB infrastructure and the Internet (the larger board in the picture above)
  • The "Control Node", a second WSN430 node, not programmable by the use, but used for monitoring (the board furthest from us in the picture above)

 

More information about IoT-LAB at https://www.iot-lab.info/.

Building for IoT-LAB

The IoT-LAB's management interface allows you to load binaries images onto the boards. These images are in the "intel-standard" format, and contain the hexadecimal representation, in ASCII characters, of each byte. This means that they can be opened by a regular text editor.

For example, the following is the 00std_uart application for the WSN430v14, in "intel-standard" format:

:104000005542200135D0085A82450011314000390F
:104010003F4000000F9308249242001120012F839B
:104020009F4FEE400011F8233F4000000F930724FC
:104030009242001120011F83CF430011F923B240A7
:10404000805A2001F240E0FF5600F240070057007E
:10405000F2D070003200F2D070003100F240300037
:104060001B00B24010006201B240803E7201B240BB
:1040700010016001F2D0C0FF0400F2D01000700007
:10408000F2D020007100F24029007400C243750094
:10409000F2404A007300F2F0FEFF7000F2D04000E0
:1040A0000000F2D080FF000032D0180032D0F000C3
:1040B000FD3F3040EC400F12F24061007700F2E02B
:1040C000200031003F4100130F12F2F0BFFF020049
:1040D000D24276007700F2E0100031003F41001339
:0E40E0000F12F2F07F0002003F4100130013A8
:10FFE000B240B240B240B240B240B240B640B2407D
:10FFF000E040C840B240B240B240B240B2400040DF
:0400000300004000B9
:00000001FF

This file can be uploaded on IoT-LAB.

All IAR projects are already set up to generate the intel-standard version of the binary (with extension .hex) for all WSN430v13b and WSN430v14 projects.