Analog Subsystem Software
907
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
Analog Subsystem
10.5.1.2 AnalogClockEnable Function
The AnalogClockEnable function enables the clock to each Analog Subsystem peripheral. This function
requires two input parameters.
Valid #define values for the AnalogConfigReg parameter are located in the
F28M35x_AnalogSysCtrl_defines.h file.
AnalogConfig1
1
Choose Analog Config Register 1 (used to enable ADC1)
AnalogConfig2
2
Choose Analog Config Register 2 (used to enable ADC2, COMP1,2,3,4,5,6)
Valid #define values for the AnalogClockMask parameter are located in the
F28M35x_AnalogSysCtrl_defines.h file.
ADC1_ENABLE
0x0008
Mask to Enable ADC1
ADC2_ENABLE
0x8000
Mask to Enable ADC2
COMP1_ENABLE
0x0001
Mask to Enable COMP1
COMP2_ENABLE
0x0002
Mask to Enable COMP2
COMP3_ENABLE
0x0004
Mask to Enable COMP3
COMP4_ENABLE
0x0008
Mask to Enable COMP4
COMP5_ENABLE
0x0010
Mask to Enable COMP5
COMP6_ENABLE
0x0020
Mask to Enable COMP6
ANALOGCONFIG2ALL
0x803F
Mask to Enable ADC2, COMP1,2,3,4,5,6
NOTE:
Multiple parameters can be used by ORing them together in the function call.
This function will return 0xFFFF while trying to enable the clocks, and 0 when the function completes
successfully. This function must be run in a while loop. See example software in
.
10.5.1.3 AnalogClockDisable Function
The AnalogClockDisable function disables the clock to each Analog Subsystem peripheral. This function
requires two input parameters.
Valid #define values for the AnalogConfigReg parameter are located in the
F28M35x_AnalogSysCtrl_defines.h file.
AnalogConfig1
1
Choose Analog Config Register 1 (used to enable ADC1)
AnalogConfig2
2
Choose Analog Config Register 2 (used to enable ADC2, COMP1,2,3,4,5,6)
Valid #define values for the AnalogClockMask parameter are located in the
F28M35x_AnalogSysCtrl_defines.h file.
ADC1_ENABLE
0x0008
Mask to Enable ADC1
ADC2_ENABLE
0x8000
Mask to Enable ADC2
COMP1_ENABLE
0x0001
Mask to Enable COMP1
COMP2_ENABLE
0x0002
Mask to Enable COMP2
COMP3_ENABLE
0x0004
Mask to Enable COMP3
COMP4_ENABLE
0x0008
Mask to Enable COMP4
COMP5_ENABLE
0x0010
Mask to Enable COMP5
COMP6_ENABLE
0x0020
Mask to Enable COMP6
ANALOGCONFIG2ALL
0x803F
Mask to Enable ADC2, COMP1,2,3,4,5,6
NOTE:
Multiple parameters can be used by ORing them together in the function call.
This function will return 0xFFFF while trying to disable the clocks, and 0 when the function completes
successfully. This function must be run in a while loop. See example software in
.
10.5.1.4 ReadAnalogClockStatus
The ReadAnalogClockStatus function is used to read the status of the Analog Subsystem Configuration 1
and 2 registers. These are the registers written to using the AnalogClockEnable and AnalogClockDisable
functions.
Valid #define values for the AnalogConfigReg parameter are located in the
F28M35x_AnalogSysCtrl_defines.h file.