I have recently begun working with the MSP430 launchpads and have been using Energia to program it. My previous tests have thus far proven successful, such as creating a bit counter and reading a analog input. I am not attempting to work with the CC110L booster pack in combination with the MSP430 launchpad and Energia, and have been having difficulties working with it. When I tried running the example codes offered by Energia, it caused the code to freeze and not work properly. I have tried my own simple tests, and each time the code freezes. One such example code is as follows:
#include <SPI.h>
#include <AIR430BoostFCC.h>
#define led P6_1
// Data to read from radio RX FIFO (60 bytes MAX.)
unsigned char rxData[6] = { '\0', '\0', '\0', '\0', '\0', '\0' };
void printRxData()
{
Serial.print("RX (DATA, RSSI, LQI, CRCBIT): ");
Serial.print("(");
Serial.print((char*)rxData);
Serial.print(", ");
Serial.print(Radio.getRssi());
Serial.print(", ");
Serial.print(Radio.getLqi());
Serial.print(", ");
Serial.print(Radio.getCrcBit());
Serial.println(")");
}
void setup()
{
pinMode(led, OUTPUT);
digitalWrite(led, HIGH);
Serial.begin(9600);
Serial.println("program start");
// put your setup code here, to run once:
Radio.begin(0x01,CHANNEL_1, POWER_MAX);
}
void loop()
{
// put your main code here, to run repeatedly:
if (Radio.receiverOn(rxData, sizeof(rxData), 1000) > 0){
digitalWrite(led, HIGH);
printRxData();
delay(1000);
}
else{
digitalWrite(led, LOW);
Serial.print("No Data recieved, ");
Serial.println("please confirm transmission.");
delay(1000);
}
}
I have looked into various forum posts for questions similar to my own, and have thus far been unable to find a reason for my program freezing. The example code above allows for the device to light up the LED on the breadboard, as well as print the message "program start" without trouble, but it always freezes when it reaches "Radio.begin(0x01,CHANNEL_1, POWER_MAX);" without any obvious explanation as to why. The specifics of my program and parts used are as follows:
Energia 0101E0013
MSP-EXP430F5529LP ( Initial Launchpad used )
MSP-EXP430G2 ( Specific chip is M430G2553 )
Anaren Air - CC110L booster pack - Anaren LR09A
If anyone can help me figure out what is causing this error, and how I can fix it so that I can use Energia and my CC110L booster pack, I'd greatly appreciate a response.