Note that the TUNITCON register field will stop incrementing when it reaches its maximumvalue so it will not rollover to zero and start counting up again.44.5.2 Interrupts and EventsThe USBDCD module has an interrupt to alert system software of certain events, whichare listed in the following table. All events except the Phase Complete event for the DataPin Detection phase can trigger an interrupt.Table 44-18. Events Triggering an Interrupt by Sequence PhaseSequencePhase Event Event Description STATUS Fields1 PhaseDescriptionData PinDetectionPhaseCompleteThe module has detected data pin contact.No interrupt occurs: CONTROL[IF] = 0.ERR = 0SEQ_STAT = 01SEQ_RES = 00TO = 0VBUS ContactDetectionCharging PortDetectionPhaseCompleteThe module has completed the process ofidentifying if the USB port is a charging port ornot.ERR = 0SEQ_STAT = 10SEQ_RES = 01 or 10TO = 0Charging PortDetectionError The module cannot identify the type of portbecause the D- line is above the USB's VLGCthreshold.ERR = 1SEQ_STAT = 10SEQ_RES = 00TO = 0Error in ChargingPort DetectionCharger TypeDetectionPhaseCompleteThe module has completed the process ofidentifying the charger type detection.Note: The ERR flag always reads as zerobecause no known error conditionsare checked during this phase.ERR = 0SEQ_STAT = 11SEQ_RES = 11 or 10TO = 0Charger TypeDetectionSequenceTimeoutError The timeout interval from the time the USBdevice attaches to a USB port until it connectshas elapsedERR = 1SEQ_STAT = last value2SEQ_RES = last value2TO = 1ChargerDetectionSequenceTimeout.1. See the description of the Status Register for register information.2. The SEQ_STAT and SEQ_RES fields retain the values held at the time of the timeout error.44.5.2.1 Interrupt HandlingSoftware can read which event caused the interrupt from the STATUS register during theinterrupt service routine.Chapter 44 USB Device Charger Detection Module (USBDCD)K51 Sub-Family Reference Manual, Rev. 6, Nov 2011Freescale Semiconductor, Inc. 1115