Specifications
9
6263A–ATARM–10-Oct-06
Application Note
Figure 3-2. Callback Invocation Flowchart
3.4.2 Init
The Init callback is invoked when the USB_Init method is called. It has to perform several man-
datory steps to make it possible to use the API:
• If an OS is used, perform any specific operation to install the driver
• Configure USB controller interrupt
• Configure Vbus monitoring PIO and interrupt
The USB controller interrupt must be configured to call the USB_Handler API function when
triggered. This is necessary to have events happening at the USB controller level handled
appropriately by the API.
USB_Init
Initialization
USB controller USB API Application
End of bus reset
USB_Handler
SETUP received
USB_Handler
Bus idle
USB_Handler
Bus activity
USB_Handler
Start of USB frame
USB_Handler
Cable disconnected
USB_Attach
Cable connected
USB_Attach
Callback: Init
Callback: Reset
Callback: NewRequest
Callback: Suspend
Callback: Resume
Callback: StartOfFrame
Interrupt handler
Callback: Suspend
Interrupt handler
Callback: Resume