Information
• Updates the STATUS register to reflect that a timeout error has occured. See Table
41-18 for field values.
• Sets the CONTROL[IF] bit.
• Generates an interrupt if enabled in CONTROL[IE].
• The detection sequence continues until explicitly halted by software setting the
CONTROL[SR] bit.
• The Unit Connection Timer continues counting. See the description of the TIMER0
Register.
At this point, control has been passed to system software via the interrupt, which has two
options: ignore the interrupt and allow more time for the sequence to complete, or halt the
sequence. To halt the sequence, software should:
1. Read the STATUS register.
2. Set the CONTROL[IACK] bit to acknowledge the interrupt.
3. Set the CONTROL[SR] bit to issue a software reset to the module.
4. Disable the module.
This timeout function is also useful in case software does not realize that the USB device
is unplugged from USB port during the charger detection sequence. If the interrupt occurs
but the V
BUS_DETECT
input is low, software can disable and reset the module.
System software might allow the sequence to run past the timeout interrupt under these
conditions:
1. The USB Battery Charging Spec is amended to allow more time. In this case,
software should poll TIMER0[T
UNITCON
] periodically to track elapsed time after 1s;
or
2. For debug purposes.
Note that the T
UNITCON
register field will stop incrementing when it reaches its maximum
value so it will not rollover to zero and start counting up again.
Chapter 41 USB Device Charger Detection Module (USBDCD)
K20 Sub-Family Reference Manual, Rev. 2, Feb 2012
Freescale Semiconductor, Inc. 947
