Interfacing

CAN controller

131 36141
hjoe  
Reply 8# tony_zhang

I have downloaded the Lubuntu image and found
lib/modules/3.4.90/kernel/net/can/
insgesamt 92
drwxrwxr-x  2 1001 plugdev  4096 25. Jun 13:59 ./
drwxrwxr-x 22 1001 plugdev  4096 25. Jun 13:55 ../
-rw-rw-r--  1 1001 plugdev 23792 25. Jun 13:59 can-bcm.ko
-rw-rw-r--  1 1001 plugdev 15236 25. Jun 13:59 can-gw.ko
-rw-rw-r--  1 1001 plugdev 27860 25. Jun 13:59 can.ko
-rw-rw-r--  1 1001 plugdev 14544 25. Jun 13:59 can-raw.ko

but no A20-CAN device driver in  lib/modules/3.4.90/kernel/drivers/net/can/
drwxrwxr-x  4 1001 plugdev  4096 25. Jun 13:59 ./
drwxrwxr-x 13 1001 plugdev  4096 25. Jun 13:59 ../
-rw-rw-r--  1 1001 plugdev 17292 25. Jun 13:59 can-dev.ko
-rw-rw-r--  1 1001 plugdev 20476 25. Jun 13:59 mcp251x.ko
-rw-rw-r--  1 1001 plugdev 13152 25. Jun 13:59 slcan.ko
drwxrwxr-x  2 1001 plugdev  4096 25. Jun 13:59 softing/
drwxrwxr-x  3 1001 plugdev  4096 25. Jun 13:59 usb/
-rw-rw-r--  1 1001 plugdev  6348 25. Jun 13:59 vcan.so

Are you testing the Microchip CAN mcp2515 connected via SPI?

what about the internal CAN controller mentioned in the A20 manual?

Heinz

Reply 10# hjoe

We also have very few materials for A20 CAN bus. We have the experience in debugging the CAN, but never do under Linux. So we are also searching materials to write a demo program. Can you help us with it?

hjoe  
Reply 8# tony_zhang


I still got no answer to my CAN related question.
If you are working on CAn, you must have a documentation and I hope you will share it.

Hello Tony,

i too am very interested in the CAN support.

I am currently writing a GTK GUI which browses CAN messages and it features a powerful CAN ID filter for listening/analyzing.
Up to now, i use a RaspberryPi and an Olimex AVR-CAN board connected via a RS232-to-USB converter.
It works very performant and stable, but anyway i would like to get rid of the additional hardware, so the Banana Pi would be the perfect platform for my project, as soon as CAN support will be available.

Writing the CAN driver for the AVR was very easy to do, but i am afraid i don't have enough linux kernel experience to do it for the Banana Pi.
Also, i haven't found sufficient docu of the A20 CAN registers.

I would be very happy about the CAN support available.
Also, i would happily help testing any available beta versions of CAN drivers.

Please let me know, when do you think, a CAN driver might be available for the BananaPi?

Thank you and best regards,
Al

Reply 14# stachelbaer

Thanks for support. Could you PM me your email?

Reply 13# hjoe

Sorry, I only have this one for CAN.
CAN Bus1.pdf (215.17 KB, Downloads: 483)

tron1  
Maybe this is it you're searching for.

https://github.com/plaes/sunxi-can-driver

hjoe  
Is there something better than http://dl.linux-sunxi.org/A20/CAN%20Bus1.pdf

hjoe  
I have now a stable environment to develop the can4linux CAN driver. I can do it on the BananaPi with the Lubuntu 3.0 installed. In the mean time I found "CAN Bus1.pdf" which has 14 pages, which still is not perfect. Other CAN controllers need  60 to 140 pages to describe the functionality. So I hope to get support from Allwinner or Lemaker.

My first question. I need to verify if I have correct access to the register set. Does at least one or more registers have a preset value so I can verify it?
For example the status register, is it always zero after reset or can I expect a special signature?

Second. Which  clock frequency is feed into CAN? What is the clock value at the CAN Prescaler?

Third. Do I have to do some pin muxing to arrange CAN is reaching the IO pins?

I hope for help
Heinz

Reply 19# hjoe

I got CAN information from Allwinner. It is a pity that they also did not test the CAN when they produced A20. They said it work, but has no test program.

You have to log in before you can reply Login | Sign Up

Points Rules