Question
Spirit1 stuck in PM_setup state (0x3B)
Posted on November 26, 2014 at 17:56
Hello,
I try to set up a spirit1 device. I use your given Spiriti1 library and the example projects, but while radiInit, my device stuck everytime on the same point:SpiritCmdStrobeLockTx();
do{
SpiritRefreshStatus();
}while(g_xStatus.MC_STATE != MC_STATE_LOCK);
This piece of code is located in the
SpiritManagementWaVcoCalibration(void) function (SPIRIT_Management.c), which gets called during
SpiritRadioInit(&radio);
Instead of going into lock state, the device remains in PM_setup state (0x3B). Do you now why the device behaves like this?
However, here is my SRadioInit config:
#define XTAL_FREQUENCY 52000000
#define SPIRIT_VERSION SPIRIT_VERSION_3_0
#define USE_MIDDLE_BAND
#define XTAL_OFFSET_PPM 0
#ifdef USE_VERY_LOW_BAND
#define BASE_FREQUENCY 0e6
#endif
#ifdef USE_LOW_BAND
#define BASE_FREQUENCY 0e6
#endif
#ifdef USE_MIDDLE_BAND
#define BASE_FREQUENCY 40e6
#endif
#ifdef USE_HIGH_BAND
#define BASE_FREQUENCY 80e6
#endif
#define CHANNEL_SPACE 20e3
#define CHANNEL_NUMBER 0
#define MODULATION_SELECT FSK
#define DATARATE 38400
#define FREQ_DEVIATION 20e3
#define BANDWIDTH 100E3
#define POWER_DBM 6
#define RSSI_THRESHOLD 0x20
/** SPIRIT Radio configuration struct */
static SRadioInit radio;
radio.nXtalOffsetPpm = XTAL_OFFSET_PPM;
radio.lFrequencyBase = BASE_FREQUENCY;
radio.nChannelSpace = CHANNEL_SPACE;
radio.cChannelNumber = CHANNEL_NUMBER;
radio.xModulationSelect = MODULATION_SELECT;
radio.lDatarate = DATARATE;
radio.lFreqDev = FREQ_DEVIATION;
radio.lBandwidth = BANDWIDTH;
#radioinit #lock #state #spirit1