2008-07-03 06:43:53 CAN Drivers - Interrupt driven ?
ian davidson (UNITED KINGDOM)
Message: 58263
Hi,
Are the CAN drivers interrupt driven on the receive end?
When I "cat /proc/interrupts" the CAN TX interrupt counter is changing, but the CAN RX counter does not?
Looking at the source it appears to use interrupt on receive.
Can (no pun!) anyone confirm that it uses interrupts on receive also?
Is there an explanation why the counter in /proc/interrupts does not get incremented.
Thanks,
Ian davidson
QuoteReplyEditDelete
2008-07-07 03:12:42 Re: CAN Drivers - Interrupt driven ?
Yi Li (CHINA)
Message: 58396
I ran the can4linux examples (receive and can_send) on BF537-STAMP, after successfully receive a message:
root:/> cat /proc/interrupts
6: 40208 BFIN Timer Tick
18: 0 BFIN_UART_RX
19: 24 BFIN_UART_TX
22: 1 Can-RX
23: 0 Can-TX
24: 125 EMAC_RX
43: 0 Can-Err
Err: 0
QuoteReplyEditDelete
2008-07-08 09:32:43 Re: CAN Drivers - Interrupt driven ?
ian davidson (UNITED KINGDOM)
Message: 58484
I cat /proc/interrupts, then send + recieve a few CAN messages and cat it again.
The messages are received by the application, but the error counter is incremented and not the Receive counter.
I am using kernel build 2006R2
root:/proc> cat version
Linux version 2.6.16.27-ADI-2006R2 (kernel@vgc-ds1.vitecnet.local) (gcc version 4.1.1 (ADI 06R2)) #98 Tue Jul 3 15:48:50 BST 2007
root:/proc>
6: 2288911 BFIN Timer Tick
10: 0 rtc
12: 3428923 SPORT RX Data
13: 0 SPORT TX Data
14: 0 SPORT RX Data
15: 0 SPORT TX Data
16: 60672 bfin-twi-i2c
17: 0 BF53x_SPI_DMA
18: 1630 BFIN_UART_RX
19: 32928 BFIN_UART_TX
20: 0 BFIN_UART_RX
21: 16 BFIN_UART_TX
22: 4 Can-RX
23: 226117 Can-TX
24: 93890 BFIN537_MAC_RX
43: 4710 Can-Err
45: 0 SPORT error
46: 0 SPORT error
66: 0 gpios
67: 0 gpios
68: 0 gpios
Err: 0
6: 2297071 BFIN Timer Tick
10: 0 rtc
12: 3441163 SPORT RX Data
13: 0 SPORT TX Data
14: 0 SPORT RX Data
15: 0 SPORT TX Data
16: 60864 bfin-twi-i2c
17: 0 BF53x_SPI_DMA
18: 1633 BFIN_UART_RX
19: 33065 BFIN_UART_TX
20: 0 BFIN_UART_RX
21: 16 BFIN_UART_TX
22: 4 Can-RX
23: 226247 Can-TX
24: 94274 BFIN537_MAC_RX
43: 4791 Can-Err
45: 0 SPORT error
46: 0 SPORT error
66: 0 gpios
67: 0 gpios
68: 0 gpios
Err: 0
QuoteReplyEditDelete
2008-07-08 09:54:04 Re: CAN Drivers - Interrupt driven ?
Robin Getz (UNITED STATES)
Message: 58485
Ian:
Yi was testing either on trunk or 2008R1 branch, not 2006. It could very well be that the driver had a bug in it that was fixed....
-Robin
QuoteReplyEditDelete
2008-07-08 21:44:53 Re: CAN Drivers - Interrupt driven ?
Yi Li (CHINA)
Message: 58493
Yes. I am using 2008R1 branch. I added a document describing how to configure the kernel: http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:can_module.