AN370
Outputs:
pboEncodedBytes: (pointer to BYTE in XDATA) Up to 8 valid encoded bytes in
output array.
Valid encoded array size: (BYTE): Number of bytes in the output array pboEn-
codedBytes which are valid after encoding.
vStl_PreLoop
Description: Sets up the chip for transmission. It requires the DMD ISR to be present in
the system. The function tasks are as follows:
1. Ensure that the bandgap is on .. vSys_BandGapLdo(1)
2. If the LC warmup interval set by the vOds_Setup() function (LC warmup value in
ODS_WARM2 register) is 0 then forcibly enables LC oscillator by calling vSys_-
ForceLc(). That is a usual setting for high data rates. Note that the vStl_PostLoop()
function will always clear the forced LC setting.
3. Setup and enable the temperature sensor and enable the DMD interrupt and force
the global EA flag to be enabled .. vDmdTs_RunForTemp(3)
4. Enable the ODS. Note that the ODS interrupt is not enabled and is not used for the
STL. See vStl_SingleTxLoop() for details.
5. Wait for the temperature sensor DMD valid sample and then do fine frequency tun-
ing .. vFCast_FineTune().
Since the function calls vDmdTs_RunForTemp() it forces the DMD interrupt flag EDMD
and the global interrupt enable flag EA to be both enabled:
EDMD = 1;
EA = 1;
If the data rate is high enough it also forces LC oscillator to turn on. Otherwise it is left for
the main vStl_SingleTxLoop() to turn the LC on later by the ODS serializer data sequenc-
ing. Note the fact that vStl_PreLoop() calls the vSys_BandGapLdo( 1 ), which changes
user setting. After you called the vStl_PreLoop(), change the bandgap/ldo setting back to
your liking.
Inputs:
None
82
Rev. 1.0
Need help?
Do you have a question about the Si4010 and is the answer not in the manual?