A N 3 7 0
58
Rev. 1.0
est rate, 24MHz. The original clock rate is restored before exiting.
The frequency calculation is controlled by the fact whether the crystal oscillator is enabled
or not. The function checks the value of the bXO_CTRL.XO_ENA bit. If the XO is
enabled, it is used for frequency tuning. If the XO is disabled an alternative internal algo-
rithm is used. The vFcast_Tune() function won’t turn off the XO. It is up to the user to turn
it off after tuning (e.g., to save power). The time (10 ms) needed for XO to stabilize should
also be taken into account.
As with vDmdTs_RunForTemp() this function forces on the DMD interrupt enable and the
global interrupt enable.
EDMD = 1;
EA = 1;
The vFCast_Tune() function calls the DMD clear, setup, and run function vDmdTs_Run-
ForTemp(). Therefore, after vFCast_Tune() completes, the user can retrieve the tempera-
ture readings as shown in the vDmdTs_RunForTemp() description above. There is no need
for any further DMD setup – the vFCast_Tune() function does it.
The function also forces the LC oscillator on and leaves it turned on, since this function
should be followed by a call to vPa_Tune() for antenna tuning where the LC oscillator
running is required. Since it takes about 125us for LC to stabilize, the vFCast_Tune()
leaves the LC on to save time. The vPa_Tune() turns the LC off. If the user desires to turn
the LC off, the following code can be used:
ODS_CTRL &= (~M_FORCE_LC);
This will turn off the LC force on bit.
Inputs
:
fiDesiredFreq: (float) Desired output frequency in [Hz]. This is the center fre-
quency in OOK mode and the upper frequency ( deviation) in FSK mode.
Use the si4010_calc_regs.xls calculator spreadsheet to calculate this value.
Outputs
:
None