EasyManua.ls Logo

Elprotronic MSP430 - F_Adj_Dco_Frequency; F_Test_Dco_Frequency

Default Icon
119 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
F_Adj_DCO_Frequency
F_Adj_DCO_Frequency - Adjust DCO to desired frequency and return register
value for that frequency.
VALID FPA index - ( 1 to 64 ) or 0 (ALL FPAs) executed sequentially.
Syntax:
MSPPRG_API INT_X F_Adj_DCO_Frequency( INT_X freq_Hz );
freq_Hz - 100000 to 16000000 (100kHz to 16 MHz)
Return value:
-1 - FALSE;
>=0 - DCO Register value
The DCO register value has the same format as the DCO constants saved in the Info-A segments. See
TI’s documentation for detail.
Example:
data = F_Adj_DCO_Frequency( 2000000 );
When more then one FPA is used then instruction can be executed simultaneously and register value
read after the function if finished in all targets.
F_Set_FPA_index( ALL_ACTIVE_FPA ); // select all FPA’s
F_Adj_DCO_Frequency( 2000000 );
for (n=1; n<=MAX_FPA_INDEX; n++ )
data[n] = F_LastStatus( n);
F_Test_DCO_Frequency
F_Test_DCO_Frequency - Measure DCO frequency for desired DCO register value
VALID FPA index - ( 1 to 64 ) or 0 (ALL FPAs) executed sequentially.
Syntax:
MSPPRG_API INT_X F_Test_DCO_Frequency( INT_X DCO_Const );
DCO_const - 0x0000 to 0xFFFF
Return value:
-1 - FALSE;
>=0 - DCO Frequency in Hz
Example:
107

Table of Contents