2. Enable the ATTACH interrupt (INT_ENB[ATTACH]=1).3. Wait for ATTACH interrupt (INT_STAT[ATTACH]). Signaled by USB Target pull-up resistor changing the state of DPLUS or DMINUS from 0 to 1 (SE0 to J or Kstate).4. Check the state of the JSTATE and SE0 bits in the control register. If the connectingdevice is low speed (JSTATE bit is 0), set the low-speed bit in the address registers(ADDR[LS_EN]=1) and the host without hub bit in endpoint 0 register control(EP_CTL0[HOST_WO_HUB]=1).5. Enable RESET (CTL[RESET]=1) for 10 ms.6. Enable SOF packet to keep the connected device from going to suspend(CTL[USB_EN=1]).7. Start enumeration by sending a sequence of device framework commands, deviceframe work packets to the default control pipe of the connected device. Refer to theUniversal Serial Bus Revision 2.0 specification, "Chapter 9 USB Device Framework"(http://www.usb.org/developers/docs).To complete a control transaction to a connected device:1. Complete all steps discover a connected device2. Set up the endpoint control register for bidirectional control transfers EP_CTL0[4:0]= 0x0d.3. Place a copy of the device framework setup command in a memory buffer. Refer tothe Universal Serial Bus Revision 2.0 specification, "Chapter 9 USB DeviceFramework" (http://www.usb.org/developers/docs).4. Initialize current (even or odd) TX EP0 BDT to transfer the 8 bytes of command datafor a device framework command (for example, a GET DEVICE DESCRIPTOR).• Set the BDT command word to 0x00080080 –Byte count to 8, own bit to 1.• Set the BDT buffer address field to the start address of the 8 byte commandbuffer.5. Set the USB device address of the target device in the address register (ADDR[6:0]).After the USB bus reset, the device USB address is zero. It is set to some other value(usually 1) by the Set Address device framework command.6. Write the token register with a SETUP to Endpoint 0 the target device default controlpipe (TOKEN=0xD0). This initiates a setup token on the bus followed by a datapacket. The device handshake is returned in the BDT PID field after the packetsHost Mode Operation ExamplesK51 Sub-Family Reference Manual, Rev. 6, Nov 20111086 Freescale Semiconductor, Inc.