A N 3 7 0
80
Rev. 1.0
7.13. Single Transmission Loop (STL) Module
The single transmission loop (STL) module is responsible for the following:
1. Setup for the data encoding during transmission.
2. Encoding the transmitted data on the fly.
3. Feeding the encoded data to the Output Data Serializer (ODS).
4. Fine tuning of the LC oscillator to compensate for temperature drift during transmission.
The user must call the vStl_EncodeSetup() before the first call to vStl_SingleTxLoop(). The encoding setup
function sets up the on-the-fly encoding function.
The ODS function vOds_Setup() must be called before any of the STL functions can be used.
The main transmission loop is broken into three functions vStl_PreLoop(), vStl_SingleTxLoop() and
vStl_PostLoop(). The vStl_PreLoop() is called just once to setup the transmission, the transmission core
vStl_SingleTxLoop() can be called repeatedly with different data settings, and the vStl_PostLoop() should be called
to end the transmission.
The API modules Encoding, Demodulator Temperature Sensor, Output Data Serializer, and Frequency Casting
(fine tuning) are all used in this Single Transmission Loop module.
7.13.1. STL Module Functions
vStl_EncodeSetup
Description
: Sets up the byte encoding mechanism to apply for the input frame bytes in
the vStl_SingleTxLoop() function.
This function must be called at least once before the first transmission.
The function sets up the input data encoding for STL module. See the Encoding module
for the details about the predefined encoding. The user can also provide specific encoding
function tailored to the particular application. The custom encode function must have the
following prototype:
BYTE
bEnc_CustomEncode
(
BYTE xdata * pboEncodedBytes
BYTE biByteToEncode
);
See the prototype function description in the Encoding module. If using any of the pre-
defined encoding use NULL as the encoding function pointer.
Inputs
:
biEncodeType
: (BYTE) Encoding type. See the header for the bEnc_*_c values.
Note that three encodings are predefined as described in the Encoding module
above. Note that the order of the bits in conversion is in little endian. It may not
suit the application and the user might need to provide different conversion func-
tion if the shift order of the bits to the PA needs to be reversed.