Interconnectivity
Page 8 of 22
Firmware Programming Guide for PDIUSBD12
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
5. Interrupt Service Routine
The PDIUSBD12 firmware is fully interrupt driven. The flow of ISR is straightforward and this is shown below.
At the entrance of ISR, the firmware uses D12_ReadInterruptRegister() to decide the source of interrupt and
then to dispatch it to the appropriate subroutines for processing.
ISR
ISR Entry
Read D12 Interrupt Register
Reset Idle Timer
Bus Reset?
Suspend Change?
DMA EOT?
Control In Done?
Control Out Done?
Generic In Done?
Generic Out Done?
Main In Done?
Main Out Done?
Send EOI to Interrupt Controller
End of ISR
No
No
No
No
No
No
No
No
No
Set Bus Reset Flag
Yes
Set Suspend Changed Flag
DMA EOT handler Subroutine
Control RX handler Subroutine
Control TX handler Subroutine
Generic RX handler Subroutine
Generic TX handler Subroutine
Main RX handler
Subroutine
Main TX handler
Subroutine
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes