Interface: tos.chips.tda5250.HplTda5250Config

interface HplTda5250Config

This interface provides commands and events for configureing the radio modes.

Author:
Kevin Klues

Commands
command void ADCContinuousMode() Sets the ADC to continious mode.
command void ADCOneShotMode() Sets the ADC to one shot mode.
command void ControlRxTxExternally() Control the radio Tx and Rx mode externally.
command void ControlRxTxInternally() Control the radio Tx and Rx mode internally.
command void DataValidContinuousMode() Sets the data calid detection in continous mode.
command void DataValidOneShotMode() Sets the data calid detection in one shot mode.
command void DisableReceiverInTimedModes() Disables the receiver when in TIMER_MODE or SELF_POLLING_MODE.
command void DontInvertData() Disables inverting radio data.
command void EnableReceiverInTimedModes() Enables the receiver when in TIMER_MODE or SELF_POLLING_MODE.
command uint8_t GetADCPowerDownFeedbackBit() Gets the current status of the ADC Power down feedback Bit.
command uint8_t GetADCSelectFeedbackBit() Gets the current status of the ADC select feedback Bit.
command uint8_t GetRSSIValue() Gets the currnet RSSI value.
command void HighLNAGain() Sets the low noise amplifier to high gain
command void InvertData() Enables inverting the radio data.
command bool IsDataRateBetweenHalvesOfThresholds() Checks if the data rate is between the halves of the lower threshold set by SetLowerDataRateThreshold(uint16_t value) and the upper threshold set by SetUpperDataRateThreshold(uint16_t value).
command bool IsDataRateBetweenThresholds() Checks if the data rate is between the lower threshold set by SetLowerDataRateThreshold(uint16_t value) and upper threshold set by SetUpperDataRateThreshold(uint16_t value).
command bool IsDataRateLessThanHalfOfLowerThreshold() Checks if the data rate is less than half of the lower threshold set by SetLowerDataRateThreshold(uint16_t value).
command bool IsDataRateLessThanHalfOfUpperThreshold() Checks if the data rate is half of the upper threshold set by SetUpperDataRateThreshold(uint16_t value).
command bool IsDataRateLessThanLowerThreshold() Checks if the data rate is less than the lower threshold set by SetLowerDataRateThreshold(uint16_t value).
command bool IsDataRateLessThanUpperThreshold() Checks if the data rate is less than the upper threshold set by SetUpperDataRateThreshold(uint16_t value).
command bool IsRSSIEqualToThreshold() Checks if the current RSSI equals the threshold set with SetRSSIThreshold(uint8_t value).
command bool IsRSSIGreaterThanThreshold() Checks if the current RSSI is graeter than the threshold set with SetRSSIThreshold(uint8_t value).
command bool IsTxRxPinControlled() Checks if the Tx Rx and Sleep radiomodes can be set via pin.
command void LowLNAGain() Sets the low noise amplifier to low gain
command void PowerDown() Powers the radio down.
command void PowerUp() Powers the radio up.
command void reset() Resets all Radio Registers to default values.
command void ResetSelfPollingMode() Reset the timers set in SetSelfPollingMode.
command void ResetTimerMode() Resets the timers set in SetTimerMode().
command void RunInNormalMode() Switches the radio to normal operation.
command void RunInTestMode() Switch radio to test operation.
command void SetClockOffDuringPowerDown() Disables internal clock during power down.
command void SetClockOnDuringPowerDown() Enables internal clock during power down.
command void SetIQFilter(tda5250_iq_cutoff_freqs_t iq_cutoff) Set the contents of the LPF register with the IQ filter value.
command void SetLowerDataRateThreshold(uint16_t value) Sets the lower data rate threshold for data valid detection.
command void SetLowPassFilter(tda5250_data_cutoff_freqs_t data_cutoff) Set the contents of the LPF register with the Low pass filter
command void SetOffTime_ms(float time) Set the off time time of the radio.
command void SetOnTime_ms(float time) Set the on time time of the radio.
command void SetRadioClock(tda5250_clock_out_freqs_t freq) Sets the CLK_DIV to specified output.
command void SetRFPower(uint8_t value) Set the value on the attached Potentiometer for the RF Power setting.
command void SetRSSIThreshold(uint8_t value) Sets the RSSI threshold for internal evaluation.
command void SetRxMode() Switches the radio to RxMode when in SLAVE_MODE
command void SetSelfPollingMode(float on_time, float off_time) Set the mode of the radio to SetSelfPollingMode.
command void SetSlaveMode() Set the mode of the radio to SlaveMode.
command void SetSleepMode() Switches the radio to SleepMode when in SLAVE_MODE
command void SetTimerMode(float on_time, float off_time) Set the mode of the radio to TimerMode.
command void SetTxMode() Switches the radio to TxMode when in SLAVE_MODE
command void SetUpperDataRateThreshold(uint16_t value) Sets the upper data rate threshold for data valid detection.
command void SetVCCOver5Threshold(uint8_t value) Sets the threshold values for internal evaluation.
command void TuneNomFreqWithBipolarFET(tda5250_bipolar_fet_ramp_times_t ramp_time, tda5250_cap_vals_t cap_val) Tune the nominal frequency with a Bipolar FET.
command void TuneNomFreqWithFET(tda5250_cap_vals_t cap_val) Tune the nominal frequency with a FET
command void Use18MHzClock() Sets the CLK_DIV to 18Mhz output.
command void Use32KHzClock() Sets the CLK_DIV to 32Khz output.
command void UseASK(tda5250_cap_vals_t pos_shift) Use ASK mosulation.
command void UseDataAlwaysValid() Do not use data valid detection.
command void UseDataValidDetection() Use the data valid detection.
command void UseFSK(tda5250_cap_vals_t pos_shift, tda5250_cap_vals_t neg_shift) Use FSK modulation.
command void UseHighTxPower() Use high transmit power.
command void UseLowTxPower() Use low transmit power.
command void UsePeakDetector() Set the data slicer to use the Peak Detector.
command void UseRCIntegrator() Set the data slicer to use the RC integrator.
command void UseRSSIDataValidDetection(uint8_t value, uint16_t lower_bound, uint16_t upper_bound) Use the RSSI data valid detection.
command void UseSetClock() Initialzes the CLK_DIV so that SetRadioClock(tda5250_clock_out_freqs_t freq) can be used.
command void UseVCCDataValidDetection(uint8_t value, uint16_t lower_bound, uint16_t upper_bound) Use the Vcc data valid detection.
command void UseWindowCountAsClock() Sets the CLK_DIV to use window count as output.

Events
event void PWDDDInterrupt() Notification of interrupt when in TimerMode or SelfPollingMode.

Commands - Details

ADCContinuousMode

command void ADCContinuousMode()

Sets the ADC to continious mode. Analog sampling data is taken continously.

ADCOneShotMode

command void ADCOneShotMode()

Sets the ADC to one shot mode. The sampling data is taken in one shot.

ControlRxTxExternally

command void ControlRxTxExternally()

Control the radio Tx and Rx mode externally.

ControlRxTxInternally

command void ControlRxTxInternally()

Control the radio Tx and Rx mode internally.

DataValidContinuousMode

command void DataValidContinuousMode()

Sets the data calid detection in continous mode.

DataValidOneShotMode

command void DataValidOneShotMode()

Sets the data calid detection in one shot mode.

DisableReceiverInTimedModes

command void DisableReceiverInTimedModes()

Disables the receiver when in TIMER_MODE or SELF_POLLING_MODE.

DontInvertData

command void DontInvertData()

Disables inverting radio data.

EnableReceiverInTimedModes

command void EnableReceiverInTimedModes()

Enables the receiver when in TIMER_MODE or SELF_POLLING_MODE.

GetADCPowerDownFeedbackBit

command uint8_t GetADCPowerDownFeedbackBit()

Gets the current status of the ADC Power down feedback Bit. The ADC Power down feedback Bit is "0" if ADC power is up. It is "1" if ADC power is down.

Returns:
"0" if ADC power is up "1" otherwise.

GetADCSelectFeedbackBit

command uint8_t GetADCSelectFeedbackBit()

Gets the current status of the ADC select feedback Bit. The ADC select feedback Bit is "0" if the ADC is connected to a resistor network dividing the Vcc voltage by 5. The ADC select feedback Bit is "1" if the ADC is connected to the RSSI voltage.

Returns:
"0" if ADC connected to Vcc/5. "1" if ADC connected to RSSI voltage.

GetRSSIValue

command uint8_t GetRSSIValue()

Gets the currnet RSSI value.

Returns:
Current RSSI.

HighLNAGain

command void HighLNAGain()

Sets the low noise amplifier to high gain

InvertData

command void InvertData()

Enables inverting the radio data.

IsDataRateBetweenHalvesOfThresholds

command bool IsDataRateBetweenHalvesOfThresholds()

Checks if the data rate is between the halves of the lower threshold set by SetLowerDataRateThreshold(uint16_t value) and the upper threshold set by SetUpperDataRateThreshold(uint16_t value).

Returns:
TRUE if the data rate is between the halves of the lower and upper threshold FALSE otherwise.

IsDataRateBetweenThresholds

command bool IsDataRateBetweenThresholds()

Checks if the data rate is between the lower threshold set by SetLowerDataRateThreshold(uint16_t value) and upper threshold set by SetUpperDataRateThreshold(uint16_t value).

Returns:
TRUE if data rate is between the lower and upper threshold FALSE otherwise.

IsDataRateLessThanHalfOfLowerThreshold

command bool IsDataRateLessThanHalfOfLowerThreshold()

Checks if the data rate is less than half of the lower threshold set by SetLowerDataRateThreshold(uint16_t value).

Returns:
TRUE if data rate is less than half of the lower threshold FALSE otherwise.

IsDataRateLessThanHalfOfUpperThreshold

command bool IsDataRateLessThanHalfOfUpperThreshold()

Checks if the data rate is half of the upper threshold set by SetUpperDataRateThreshold(uint16_t value).

Returns:
TRUE if data rate is less than half of the upper threshold FALSE otherwise.

IsDataRateLessThanLowerThreshold

command bool IsDataRateLessThanLowerThreshold()

Checks if the data rate is less than the lower threshold set by SetLowerDataRateThreshold(uint16_t value).

Returns:
TRUE if data rate is less than lower threshold FALSE otherwise.

IsDataRateLessThanUpperThreshold

command bool IsDataRateLessThanUpperThreshold()

Checks if the data rate is less than the upper threshold set by SetUpperDataRateThreshold(uint16_t value).

Returns:
TRUE if data rate is less than upper threshold FALSE otherwise.

IsRSSIEqualToThreshold

command bool IsRSSIEqualToThreshold()

Checks if the current RSSI equals the threshold set with SetRSSIThreshold(uint8_t value).

Returns:
TRUE if RSSI equals the threshold value FALSE otherwise.

IsRSSIGreaterThanThreshold

command bool IsRSSIGreaterThanThreshold()

Checks if the current RSSI is graeter than the threshold set with SetRSSIThreshold(uint8_t value).

Returns:
TRUE if RSSI greater than threshold value FALSE otherwise.

IsTxRxPinControlled

command bool IsTxRxPinControlled()

Checks if the Tx Rx and Sleep radiomodes can be set via pin. This only concerns SetTxMode(), SetRxMode() and SetSleepMode().

Returns:
TRUE if radiomodes can be set via pin FALSE otherwise.

LowLNAGain

command void LowLNAGain()

Sets the low noise amplifier to low gain

PowerDown

command void PowerDown()

Powers the radio down.

PowerUp

command void PowerUp()

Powers the radio up.

reset

command void reset()

Resets all Radio Registers to default values. The default values can be found in tda5250RegDefaults.h

ResetSelfPollingMode

command void ResetSelfPollingMode()

Reset the timers set in SetSelfPollingMode.

ResetTimerMode

command void ResetTimerMode()

Resets the timers set in SetTimerMode().

RunInNormalMode

command void RunInNormalMode()

Switches the radio to normal operation.

RunInTestMode

command void RunInTestMode()

Switch radio to test operation. FIXME: Whatever this means...

SetClockOffDuringPowerDown

command void SetClockOffDuringPowerDown()

Disables internal clock during power down.

SetClockOnDuringPowerDown

command void SetClockOnDuringPowerDown()

Enables internal clock during power down.

SetIQFilter

command void SetIQFilter(tda5250_iq_cutoff_freqs_t iq_cutoff)

Set the contents of the LPF register with the IQ filter value.

Parameters:
iq_cutoff - IQ filter characteristics. For recognized values see tda5250Const.h

SetLowerDataRateThreshold

command void SetLowerDataRateThreshold(uint16_t value)

Sets the lower data rate threshold for data valid detection.

Parameters:
Lower - data rate threshold value.

SetLowPassFilter

command void SetLowPassFilter(tda5250_data_cutoff_freqs_t data_cutoff)

Set the contents of the LPF register with the Low pass filter

Parameters:
data_cutoff - LowPassFilter characteristics. For recognized values see tda5250Const.h

SetOffTime_ms

command void SetOffTime_ms(float time)

Set the off time time of the radio. This only makes sense when radio is in TIMER or SELF_POLLING Mode.

Parameters:
time - The time (ms) the radio is off.

SetOnTime_ms

command void SetOnTime_ms(float time)

Set the on time time of the radio. This only makes sense when radio is in TIMER or SELF_POLLING Mode.

Parameters:
time - The time (ms) the radio is on.

SetRadioClock

command void SetRadioClock(tda5250_clock_out_freqs_t freq)

Sets the CLK_DIV to specified output. UseSetClock() must be called before! Available frequencies given in TDA5250ClockFreq_t struct in tda5250Const.h.

Parameters:
freq - The new clock frequency (see tda5250.h).

SetRFPower

command void SetRFPower(uint8_t value)

Set the value on the attached Potentiometer for the RF Power setting.

Parameters:
RF - Power.

SetRSSIThreshold

command void SetRSSIThreshold(uint8_t value)

Sets the RSSI threshold for internal evaluation.

Parameters:
RSSI - threshold value.

SetRxMode

command void SetRxMode()

Switches the radio to RxMode when in SLAVE_MODE

SetSelfPollingMode

command void SetSelfPollingMode(float on_time, float off_time)

Set the mode of the radio to SetSelfPollingMode.

Parameters:
on_time - The time (ms) the radio is on.
off_time - The time (ms) the radio is off.

SetSlaveMode

command void SetSlaveMode()

Set the mode of the radio to SlaveMode.

SetSleepMode

command void SetSleepMode()

Switches the radio to SleepMode when in SLAVE_MODE

SetTimerMode

command void SetTimerMode(float on_time, float off_time)

Set the mode of the radio to TimerMode.

Parameters:
on_time - The time (ms) the radio is on.
off_time - The time (ms) the radio is off.

SetTxMode

command void SetTxMode()

Switches the radio to TxMode when in SLAVE_MODE

SetUpperDataRateThreshold

command void SetUpperDataRateThreshold(uint16_t value)

Sets the upper data rate threshold for data valid detection.

Parameters:
Upper - data rate threshold value.

SetVCCOver5Threshold

command void SetVCCOver5Threshold(uint8_t value)

Sets the threshold values for internal evaluation. (FIXME: what threshold is set with this?)

Parameters:
value - Threshold value.

TuneNomFreqWithBipolarFET

command void TuneNomFreqWithBipolarFET(tda5250_bipolar_fet_ramp_times_t ramp_time, tda5250_cap_vals_t cap_val)

Tune the nominal frequency with a Bipolar FET.

Parameters:
ramp_time - Ramp time.
cap_val - Capacitor value.

TuneNomFreqWithFET

command void TuneNomFreqWithFET(tda5250_cap_vals_t cap_val)

Tune the nominal frequency with a FET

Parameters:
cap_val - Capacitor value.

Use18MHzClock

command void Use18MHzClock()

Sets the CLK_DIV to 18Mhz output.

Use32KHzClock

command void Use32KHzClock()

Sets the CLK_DIV to 32Khz output.

UseASK

command void UseASK(tda5250_cap_vals_t pos_shift)

Use ASK mosulation.

Parameters:
pos_shift - Capacitor value for positive shift. (FIXME: makes sense?)

UseDataAlwaysValid

command void UseDataAlwaysValid()

Do not use data valid detection. This means that it is assumed that the receiving data is always valid data. It is absolutely necessary to set the RSSI-ADC (and the Window counter) into continuous mode.

UseDataValidDetection

command void UseDataValidDetection()

Use the data valid detection. This means that the receiving data is checked either by RSSI data valid detection or by Vcc data valid detection if it is actual data and no noise.

UseFSK

command void UseFSK(tda5250_cap_vals_t pos_shift, tda5250_cap_vals_t neg_shift)

Use FSK modulation.

Parameters:
pos_shift - Capacitor value for positive shift.
neg_shift - Capacitor value for negative shift.

UseHighTxPower

command void UseHighTxPower()

Use high transmit power.

UseLowTxPower

command void UseLowTxPower()

Use low transmit power.

UsePeakDetector

command void UsePeakDetector()

Set the data slicer to use the Peak Detector. The data slicer is an analog-to-digital converter for the radio data. When using peak detector the peak value of the analog data is used to convert the analog data to a Bit.

UseRCIntegrator

command void UseRCIntegrator()

Set the data slicer to use the RC integrator. The data slicer is an analog-to-digital converter for the radio data. When using RC integrator the mean value of the analog data is used to convert the analog data to a Bit.

UseRSSIDataValidDetection

command void UseRSSIDataValidDetection(uint8_t value, uint16_t lower_bound, uint16_t upper_bound)

Use the RSSI data valid detection. For the data valid detection 3 thresholds must be defined. The data is only considered valid if the RSSI is greater than RSSI threshold and the data rate is between the lower and upper data rate threshold.

Parameters:
value - The RSSI threshold for valid data.
lower_bound - Lower data rate threshold.
upper_bound - Upper data rate threshold.

UseSetClock

command void UseSetClock()

Initialzes the CLK_DIV so that SetRadioClock(tda5250_clock_out_freqs_t freq) can be used.

UseVCCDataValidDetection

command void UseVCCDataValidDetection(uint8_t value, uint16_t lower_bound, uint16_t upper_bound)

Use the Vcc data valid detection. For the data valid detection 3 thresholds must be defined. The data is only considered valid if the voltage is greater than voltage threshold and the data rate is between the lower and upper data rate threshold.

Parameters:
value - The voltage threshold for valid data.
lower_bound - Lower data rate threshold.
upper_bound - Upper data rate threshold.

UseWindowCountAsClock

command void UseWindowCountAsClock()

Sets the CLK_DIV to use window count as output.

Events - Details

PWDDDInterrupt

event void PWDDDInterrupt()

Notification of interrupt when in TimerMode or SelfPollingMode.