Wixel SDK
Macros | Functions
radio_registers.h File Reference
#include <cc2511_types.h>

Go to the source code of this file.

Macros

#define RSSI_OFFSET   71
 

Functions

void radioRegistersInit ()
 
uint8 radioLqi ()
 
int8 radioRssi ()
 
BIT radioCrcPassed ()
 

Detailed Description

This header file provides a function for configuring the radio registers (radioRegistersInit()) and also some small functions for reading information from the radio.

Definition in file radio_registers.h.

Macro Definition Documentation

#define RSSI_OFFSET   71

An offset used by radioRssi() to calculate the RSSI. According to Table 68 of the CC2511F32 datasheet, RSSI offset for 250kbps is 71.

Definition at line 57 of file radio_registers.h.

Function Documentation

BIT radioCrcPassed ( )
Returns
1 if the last packet received has a correct CRC-16, 0 otherwise.

If this function returns 0, the data in the last packet received was corrupted and should not be relied upon.

Definition at line 83 of file radio_registers.c.

uint8 radioLqi ( )
Returns
The Link Quality Indicator (LQI) of the last packet received.

According to the CC2511F32 datasheet, the LQI is a metric of the quality of the received signal. "LQI is best used as a relative measurement of link quality (a high value indicates a better link than what a low value does), since the value is dependent on the modulation format."

Definition at line 88 of file radio_registers.c.

void radioRegistersInit ( )

Configures the CC2511's radio module using settings that have been tested by Pololu and are known to work.

In summary, these settings are:

  • Data rate = 350 kbps
  • Modulation = MSK
  • Channel 0 frequency = 2403.47 MHz
  • Channel spacing = 286.4 kHz
  • Channel bandwidth = 600 kHz

This function does not configure the PKTLEN, MCSM0, MCSM1, MCSM2, CHANNR, or ADDR registers or the DMA: That should be done by higher-level code.

Definition at line 4 of file radio_registers.c.

int8 radioRssi ( )
Returns
The signal strength of the last packet received, if the radio just exited RX mode. If the radio is in RX mode, returns a continuously-updated estimate of the signal level in the channel. The units are dBm.

The RSSI typically be between -100 and -10. A higher number (closer to zero if negative) is better. RSSI stands for Received Signal Strength Indication.

Definition at line 93 of file radio_registers.c.