Example 5-5. Headset Type and Load-Detection Sequence (Cont.)
S
T
TEP
ASK
11.9
Configure HS DET
comparator reference
levels.
11.10 Configure the HSDET
mode.
12 Service the HSDET_AUTO_DONE interrupt.
12.1
Read HSDET_AUTO_
DONE to confirm the
detection cycle is complete.
12.2
Read the HSDET_TYPE to
confirm the headset type.
12.3
Configure the HSDET
mode.
13 If headset type 1–3 is detected, the switches are set to the appropriate states automatically. Go to Step 16.
If a known headset type is not detected, continue with Step 14.
14 The system manually determines the headset type.
14.1
Set HSDET mode to
Manual—Active.
14.2
Open the SW_HSB_HS3
switch and close SW_HSB_
HS4 for a Type 1 headset.
14.3
Read the output of the
HSDET comparator for the
Type 1 headset result.
14.4
Close the SW_HSB_HS3
switch for a Type 2 headset.
14.5
Read the output of the
HSDET comparator for the
Type 2 headset result.
15 Based on the results of the comparator reading, set all of the switches to their appropriate states.
15.1
Set switches.
15.2
Set HSDET mode to
Manual—Disabled.
16 If external switches are used, set them according to
are set appropriately.
DS1083F2
R
/B
F
EGISTER
IT
IELDS
Headset Detect Control 1. 0x111F
HSDET_COMP2_LVL
HSDET_COMP1_LVL
Headset Detect Control 2. 0x1120
HSDET_CTRL
HSDET_SET
HSBIAS_REF
Reserved
HSDET_AUTO_TIME
Codec Interrupt Status. 0x1308
Reserved
HSDET_AUTO_DONE
PDN_DONE
Headset Detect Status. 0x1124
HSDET_COMP2_OUT
HSDET_COMP1_OUT
Reserved
HSDET_TYPE
Headset Detect Control 2. 0x1120
HSDET_CTRL
HSDET_SET
HSBIAS_REF
Reserved
HSDET_AUTO_TIME
Headset Detect Control 2. 0x1120
HSDET_CTRL
HSDET_SET
HSBIAS_REF
Reserved
HSDET_AUTO_TIME
Headset Switch Control. 0x1121
SW_REF_HSx
††
SW_HSB_FILT_HSx
††
††
SW_HSB_HSx
††
SW_GNDHS_HSx
Headset Detect Status. 0x1124
HSDET_COMP2_OUT
HSDET_COMP1_OUT
Reserved
HSDET_TYPE
Headset Switch Control. 0x1121
††
SW_REF_HSx
††
SW_HSB_FILT_HSx
SW_HSB_HSx
††
SW_GNDHS_HSx
††
Headset Detect Status. 0x1124
HSDET_COMP2_OUT
HSDET_COMP1_OUT
Reserved
HSDET_TYPE
Headset Switch Control. 0x1121
SW_REF_HSx
††
SW_HSB_FILT_HSx
††
SW_HSB_HSx
††
SW_GNDHS_HSx
††
Headset Detect Control 2. 0x1120
HSDET_CTRL
HSDET_SET
HSBIAS_REF
Reserved
HSDET_AUTO_TIME
Table
4-23, making sure to disable GNDHS_HS3 and GNDHS_HS4 after external switch states
5.7 Detection Sequence from Wake
V
ALUE
0x77
0111
Reference level is set to 2.00 V.
0111
Reference level is set to 1.00 V.
0xC0
11
HSDET mode set to automatic, active.
00
HS3 is GND, HS4 is HSBIAS (setting is ignored).
0
HSx_REF is the ground reference.
0
—
00
Cycle time set to 10 µs.
0x02
0000 00
—
1
Autotype detect has completed the detection cycle.
0
Codec is powered up.
—
x
Refer to
Table 4-22
for decode.
x
Refer to
Table 4-22
for decode.
0000
—
xx
Refer to
Table 4-22
for decode.
0x80
10
HSDET mode set to automatic, disabled.
00
HS3 is GND, HS4 is HSBIAS (setting is ignored).
0
HSx_REF is the ground reference.
0
—
00
Cycle time set to 10 µs.
0x40
01
HSDET mode set to manual, active.
00
HS3 is GND, HS4 is HSBIAS (setting is ignored).
0
HSx_REF is the ground reference.
0
—
00
Cycle time set to 10 µs.
0xA6
10
Ref-to-HSx (HS3 closed; HS4 open)
10
HSBIAS_FILT-to-HSx (HS3 closed; HS4 open)
01
HSBIAS-to-HSx (HS3 open; HS4 closed)
10
GNDHS-to-HSx (HS3 closed; HS4 open)
—
xx
Refer to
Table 4-22
for decode.
xx
Refer to
Table 4-22
for decode.
00
—
xx
Unused in this mode
0x59
01
Ref-to-HSx (HS3 open; HS4 closed)
01
HSBIAS_FILT-to-HSx (HS3 open; HS4 closed)
10
HSBIAS-to-HSx (HS3 closed; HS4 open)
01
GNDHS-to-HSx (HS3 open; HS4 closed)
—
xx
Refer to
Table 4-22
for decode.
xx
Refer to
Table 4-22
for decode.
00
—
xx
Unused in this mode
0xXX
xx
See
Section
7.4.13,
"Headset Switch
xx
xx
xx
0x00
00
HSDET mode set to manual, disabled.
00
HS3 is GND, HS4 is HSBIAS (setting is ignored).
0
HSx_REF is the ground reference.
0
—
00
Cycle time set to 10 µs.
CS42L42
D
ESCRIPTION
Control."
99
Need help?
Do you have a question about the CS42L42 and is the answer not in the manual?