AcroPack Series AP560
CAN Bus Interface Module
- 63 -
Programming Interrupts
Interrupts can be enabled for generation by the CAN controllers or events
occurring on each of the CAN channels. Interrupts generated by the AP560
use interrupt request line INTA#.
Interrupt Programming Example
1.
Write 0x01 to the interrupt enable register of each of the four CAN
controllers to enable all the interrupt sources.
2.
Enable AP560 board interrupt by writing 0x01 to the board interrupt
register at Base A 00H. This will enable the CAN controller
interrupts for each of the four channels.
3.
Interrupts can now be generated by the CAN controllers and events
detected by any of the CAN controllers.
General Sequence of Events for Processing an Interrupt
1.
The AP560 asserts the Interrupt Request Line (INTA#) in response to an
interrupt condition.
2.
Determine the IRQ line assigned to the AP560 during system
configuration (read configuration register number 15).
3.
Set up the system interrupt vector for the appropriate interrupt.
4.
Unmask the IRQ in the system interrupt controller.
5.
The interrupt service routine pointed to by the vector set up in step three
starts.
6.
The interrupt service routine determines if the AP560 has a pending
interrupt request by reading the Interrupt pending bits zero thru three of
the Interrupt Pending Register.
7.
If the any of the four CAN controller interrupts are pending, then a read of
the appropriate CAN interrupt register is required to get additional detail
of the source of the interrupt. Reading the CAN interrupt register clears
the bits in
the CAN controller’s interrupt register and clears the bit for
that channel in the FPGA
’s
interrupt register.
8.
Enable the AP560
for interrupts by writing “1” to
all the appropriate
interrupt enable bits in the Interrupt register.
9.
Write “End
-Of-
Interrupt” command to the system’s interrupt controller.
Содержание AcroPack AP560
Страница 28: ...AcroPack Series AP560 CAN Bus Interface Module 28 Figure 2 Standard Data Frame...
Страница 30: ...AcroPack Series AP560 CAN Bus Interface Module 30 Figure 3 Extended Data Frame...
Страница 32: ...AcroPack Series AP560 CAN Bus Interface Module 32 Figure 4 Remote Frame...
Страница 34: ...AcroPack Series AP560 CAN Bus Interface Module 34 Figure 5 Error Frame...