This step will guide you through the debug setup we are using and we believe is the most helpful when implementing IEEE802.15.4e. |
You will need:
We are using:
IEEE802.15.4e is a TDMA protocol; time is cut into slots and motes send and receive at very precise times within each slot. To be able to "see" your slots, we recommend you identify 6 unused GPIOs on your mote. You can then set/clear/toggle them at different instants in your code to verifiy timing. You will use the following GPIOs for debug:
name | description | importance |
frame | toggles at every frame boundary | medium |
slot | toggles at every slot boundary | high |
fsm | set/cleared at beginning of tx/rx slot; toggles every time FSM changes state | high |
task | high iff the CPU is on in task mode | low |
isr | high iff the CPU is on in interrupt mode | low |
radio | high iff the radio is on | medum |
If you don't have enough pins on your mote, or enough channels on your scope, use the "importance" columns to pick as subset.
Once you've picked the 6 debug pins, we recommend you use #define
statements to initialize (set as output), set, clear and toggle each of these pins. An example is shown below.
#define DEBUG_PIN_FRAME 0x20 // P4.5 #define DEBUG_PIN_FRAME_INIT P4DIR |= DEBUG_PIN_FRAME #define DEBUG_PIN_FRAME_TOGGLE P4OUT ^= DEBUG_PIN_FRAME #define DEBUG_PIN_FRAME_CLR P4OUT &= ~DEBUG_PIN_FRAME #define DEBUG_PIN_FRAME_SET P4OUT |= DEBUG_PIN_FRAME |
Since you will have many pins to monitor, we recommend you mount motes onto a breadboard:
Most scopes allow you to save the setup to a file. We recommend you take some time to display the state of the pins, assign a label to each channel and save that configuration in your scope.
Once you've configured your scope, you'll be able to follow the execution of the code, as shown below.
On the scope:
On the GoLogic:
NCI's GoLogic is a great USB logic analyzer which connects with the GoLogic2 software.
Even if you don't have the hardware|we recommend you install GoLogic2 (which is free) since we provide GoLogic traces throughout this website.
See TschTraces for a list of traces.
There are many IEEE802.15.4 sniffers on the market, and any will do. We happen to be using Texas Instruments' CC2531-EMK:
You can use TI's (free) packet sniffer software with it. This software allows you to save the sniffed packets. It also allows you to files with previous sniffed traces.
This is the setup we use to connect the sniffer traces listed in Debug Environment.
Wireshark sniffer
Atmel based free wireshark sniffer tool.
Link to download the sniffer interface tool: Atmel Gallery Link
Firmware for the sniffer comes along with sniffer interface tool.