- Week 4
- Aim:-
- Connect a raspberry pi 4 to a CAN bus module(controller-MCP2515 & transceiver-TJA1050)
- Procedure:-
- Boot the raspberry-pi4 with the latest raspbian buster image.
- Edit the /boot/config.txt file ( dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25 )
- Install can-utils (sudo apt-get install can-utils)
- Reboot the os.
- Prepare the can bus module to connect with the rpi4.( https://www.beyondlogic.org/wp-content/uploads/2019/12/Raspberry-PI-MCP2515-Pinout.jpg )
- Manually bring up the can interface ( sudo /sbin/ip link set can0 up type can bitrate 500000 )
- Use ifconfig to check that the can interface is up.
- Research:-
- The CAN bus (Controller Area Network) was originally designed by Robert Bosch for the automotive market to connect ECUs (Engine/Electronic Control Units) together. The protocol was officially released in 1986. The first CAN controller chips were introduced by Intel in 1987, and shortly thereafter by Philips.
- Raspberry Pi doesn't have a built-in CAN Bus but its GPIO includes SPI Bus, that is supported by large number of CAN controllers.
- The Linux kernel will not automatically discover the CAN Controller on the SPI interface. To load the appropriate driver, you must specify device tree overlay settings at boot by editing the /boot/config.txt file.
- CAN-utils is a collection of extremely useful debugging tools using the SocketCAN interface. It includes applications such as: candump , canplayer , cansend, cangen, canbusload
- CAN Bus is a multi-master protocol, each node needs a controller to manage its data. CAN controller is connected to the CAN bus using CAN-H and CAN-L.
- CAN Controller needs a send/receive chip i.e. a CAN Transceiver to adapt signals to CAN Bus levels.
- The voltage range of MCP-2515 is 2.7V to 5.5V but for TJA-1050 it is 4.7V to 5.25V. The signals will not have the same level if we connect them directly. In my case I cut a trace on the PCB and soldered a pin onto the trace to deliver 5V only to the TJA1050.
- Detailed steps and research will be published here : https://d80ep08th.github.io/Port-Jailhouse-to-AGL/
- Aim:-
_._,_._,_
Links:
You receive all messages sent to this group.
View/Reply Online (#8465) |
Reply To Group
| Reply To Sender
|
Mute This Topic
| New Topic
Mute #gsoc
Your Subscription |
Contact Group Owner |
Unsubscribe
[list-automotive-discussions82@xxxxxxxxxxx]
_._,_._,_