clinuxinterruptbeagleboneblackcan-bus

Where is the interrupt handler of the CAN bus driver on BeagleBone Black?


I am trying to use the CAN bus and PRU on BeagleBone Black to do some real-time control, but I have checked the $KERNEL/net/can/ and $KERNEL/driver/net/can, such as af_can.c and raw.c, but I can not find the request_irq(). But I do find the interrupt number 52 in device tree and cat /proc/interrupts.

I do this, because that I not want the Ethernet part to have any influence on my application.

  1. Will the Ethernet traffic affect the CAN bus?

  2. Where can I register my interrupt handler for the CAN bus?


Solution

    1. Ethernet is only affected like anything else, because the CPU is working on the CAN bus.

    2. If you use SocketCAN, CAN bus will be processed like Ethernet: by sockets. So you don't need to register an interrupt handler. Your program will be interrupted by the socket, if you write your program right. For this, search for handling sockets. There are other CAN bus handlers, which are not used by default and shouldn't be anymore, because they are outdated.