Jump to content
Sign in to follow this  

[Energia Library] LowPowerLab RFM69 adapted to Energia

Recommended Posts

I have posted my adaptation of the LowPowerLab HopeRF RFM69 (Semtech SX1231) wireless module library: https://github.com/brey549/RFM69.git  The RFM69 modules are improved versions of the popular RFM12b units (Jeelabs, openenergymon, etc) and offer up to 100mw output as well as digital RSSI() and OOK modes.  I have successfully tested MSP<>MSP, Stellaris<>Stellaris,MSP<>Stellaris,MSP<>Arduino,Stellaris<>Arduino.


I only had to change the attachInterrupt() call in RFM69.cpp & add #define overrides for the interrupts() & noInterrupts() functions in RFM69.h  I have extensively tested the library on both the MSP430G2553 & the Stellaris LM4F modules and only using the default SPI ports(Pins 7,14,15) . I chose Pin 6 for the interrupt in and Pin 8 for the SlaveSelect.


I tried many different approaches for Interrupt disable/enable; and these are the only approaches that have held up under heavy packet traffic:

For the MSP430:


#define interrupts() P1IE |= BIT4; // turn on/off our interrupt !!MUST MATCH IRQ PIN!!

#define noInterrupts() P1IE &=~BIT4; // Method used by attachInterrupt()

This has the disadvantage that it must be changed in code to match a pin change.


The Stellaris proved illusive, several recommended/coded approaches just wouldn't hold up under stress (the "Gateway" example receiving from 4 or 5 high rate nodes-eventually the board freezes mid-reception); I found this method in the HardwareSerial library:


#define interrupts()        ROM_IntMasterEnable();  // Stellaris fast enable/disable

#define noInterrupts()      ROM_IntMasterDisable();


The "Node" & "Gateway" examples work "out of the box" note that LPL uses Pin 9 for the LED; I just pulled the jumper plug off the RED_LED and added a jumper lead to Pin 9.  I have pounded my Launchpads with millions of packets but programming is not my field so let me know of any fixes or improvements.




PS: These HopeRF modules are pretty small, I use these Breakout boards: https://github.com/uChip/RFM69W_BOB  (available from Oshpark 3/$6.75)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this