Universal Serial Bus InterfaceMCF5253 Reference Manual, Rev. 1Freescale Semiconductor 24-81Activation of the list is simple. The system software writes the physical memory address of a queue headinto the ASYNCLISTADDR register, then enables the list by setting the Asynchronous Schedule Enablebit in the USBCMD register to a one.When inserting a queue head into an active list, the software must ensure that the schedule is alwayscoherent from the host controllers' point of view. This means that the system software must ensure that allqueue head pointer fields are valid. For example qTD pointers have T-Bits set or reference valid qTDs andthe Horizontal Pointer references a valid queue head data structure. The following algorithm represents thefunctional requirements:InsertQueueHead (pQHeadCurrent, pQueueHeadNew)---- Requirement: all inputs must be properly initialized.---- pQHeadCurrent is a pointer to a queue head that is-- already in the active list-- pQHeadNew is a pointer to the queue head to be added---- This algorithm links a new queue head into a existing-- list--pQueueHeadNew.HorizontalPointer = pQueueHeadCurrent.HorizontalPointerpQueueHeadCurrent.HorizontalPointer = physicalAddressOf(pQueueHeadNew)End InsertQueueHead24.9.9.2 Removing Queue Heads from Asynchronous ScheduleThis is a software requirement section. There are two independent events for removing queue heads fromthe asynchronous schedule. The first is shutting down (deactivating) the asynchronous list. The second isextracting a single queue head from an activated list. The software deactivates the asynchronous scheduleby setting the Asynchronous Schedule Enable bit in the USBCMD register to a zero. The software candetermine when the list is idle when the Asynchronous Schedule Status bit in the USBSTS register iscleared. The normal mode of operation is that the software removes queue heads from the asynchronousschedule without shutting it down. The software must not remove an active queue head from the schedule.The software should first deactivate all active qTDs, wait for the queue head to go inactive, then removethe queue head from the asynchronous list. The software removes a queue head from the asynchronous listusing the following algorithm. The software merely must ensure all of the link pointers reachable by thehost controller are kept consistent.UnlinkQueueHead (pQHeadPrevious, pQueueHeadToUnlink, pQHeadNext)---- Requirement: all inputs must be properly initialized.---- pQHeadPrevious is a pointer to a queue head that-- references the queue head to remove-- pQHeadToUnlink is a pointer to the queue head to be-- removed-- pQheadNext is a pointer to a queue head still in the-- schedule. Software provides this pointer with the-- following strict rules:-- if the host software is one queue head, then-- pQHeadNext must be the same as-- QueueheadToUnlink.HorizontalPointer. If the host