Software – Sundance SMT391-VP User Manual
Page 16

Version 1.3
Page 16 of 41
SMT391-VP User Manual
Software
An example is provided to get started with the SMT391-VP.
The example configures the module and generates files with the data acquired.
The example is based on the following libraries:
• SMT391: gathers the functions to configure the SMT391 module
• LMX2330U: gathers the functions to configure the PLL/VCO of the SMT391.
• SY89430V: gathers the functions to configure the clock synthesiser of the
SMT391.
All the libraries are stand alone.
The functions of the smt391.lib, lmx2330U.lib and sy89430v.lib libraries take as a
parameter two functions SMT338VP_WriteRegister and SMT338VP_ReadRegister.
These functions are used to communicate with the SMT391-VP.
For the 3L Diamond users these functions are defined in the library
DspDiamondLib.h and implemented in DspDiamondLib.lib.
For non 3L Diamond user, it possible to generate these functions using the
SMT6400.
Library SMT391
SMT391.lib gives access to the functions used to set up the SMT391 module.
SMT391_Config()
SMT391_Config configures the SMT391 daughter module.
Prototype
UINT32 SMT391_Config(UINT32 SamplingFrequency, UINT32 ClockSource,
SMT338VP_WRITE_REGISTER
SMT338VP_WriteRegister,
SMT338VP_READ_REGISTER SMT338VP_ReadRegister, UINT32 cp);
Return value
Always 0.
Parameters
SamplingFrequency: the requested sampling frequency of the ADC.
ClockSource: select if the source of the ADC clock is internal to the SMT391-VP
(clock synthesiser or PLL) or external.
Cp: the number of the comport to use to communicate with the SMT391-VP.