CAN bus interrupts
sebastian ssmoller
sebastian.ssmoller at gmx.net
Mon Mar 15 17:56:43 UTC 2004
hi all,
recently i started porting the powerpc/eth_comm canbus driver to my bsp
which is a modified version of the m68k/gen68360_040 one. the board is a
microsys ip460 with a tip816(i82527 compatible) CAN-controller.
after some minor problems at the beginning, i am now able to send CAN
messages. but i have some problems with receiving: polling works but i
wasnt able yet to get interrupts when a CAN message arrives.
what i did so far:
- i use the isr from the eth_comm bsp
- i registered the isr with rtems_interrupt_catch (this cpu/bsp has an
vbr)
- cause my CAN controller is an "external" card i had to write an intvec
(interrupt vector register) to let the controller know which interrupt
to generate - i did this too
- i enabled rx interrupts in general and for a message object (msg15)
now i should be able to use the CAN controller with interrupts. but it
doesnt seem to work
what i found out:
- the interrupt pending register of the CAN controller shows a pending
interrupt for msg15
- when i checked the interrupt_table i did NOT found the adress of my
interrupt handler at the proper place - i guess the registration
failed somehow (?)
- i wrote the handler by-hand using asm at the correct address (where i
assume that it is the correct one) - no (pos) effect
- i dumped intvec of the controller - the correct interrupt vector is
set there
my current suggestion is that the CAN controller does not generate the
"correct" interrupt or the interrupt vector is not correctly calculated.
how do vectored interrupts work ? for example: the vbr points to 0x10000
and i want to use vector 0x46 so i write 0x46 to the intvec of the
controller, right ? what is going on when the controller generates (or
wants to do so) an interrupt ? how to exactly find the correct handler ?
if there is a good document/book/paper/article/faq about that stuff,
could anyone point me to it, please ?
any other ideas ?
many thanx,
regards,
seb
--
Microsoft: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?
OpenBSD: Hey guys you left some holes out there!
More information about the users
mailing list