Hi Andy,
We've also written our own CC1101 stack, for the G-Node (link <http://sownet.nl/index.php/en/products/gnode> ). We're currently only shipping that with our development kits - we want to include it in the TinyOS repository at some point, but we haven't had time to sort out the licensing, etc. Anyway, I can give you some pointers based on my own experience. 1. Start at the bottom and work your way up. Build a layer to talk to the hardware: read/write registers, handle interrupts, etc. Build a basic layer on top, that can configure the radio, transfer data to/from the FIFO buffers, switch between RX and TX mode. Test this extensively. Then, implement the basic TinyOS Send/Receive/StdControl interface on top, and go from there all the way up to ActiveMessageC. 2. Interrupt handling is hard. A lot of my time went into making sure there were no race conditions when switching between RX and TX. For example, what if a packet is received exactly when you are switching from RX to TX? It's tricky to tell whether the end-of-packet interrupt was due to a received packet, or your transmitted packet. 3. Make it work first, then make it fast, if you have to. I've kept as much as possible out of interrupt context (no async code), which makes your life a lot easier. 4. Check your assumptions. Asserts are incredibly useful when debugging low level code. Best of luck! Michiel From: [email protected] [mailto:[email protected]] On Behalf Of andy smith Sent: woensdag 30 maart 2011 13:14 To: [email protected] Subject: [Tinyos-help] Developing for CC1101 hi guys, We are implementing the drivers of CC1101 for TinyOS, although there are already blaze and telosw on the Internet ,but they are the final versions,here we want to develop the drivers step by step ,but as you know, to implement the CC1101 radio stack with nesC is really tricky! We don't know where to begin? What we want to know is how to test when developing the TinyOS step by step,Can anybody help ?
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
