#agl #automotive Could not boot when add mcp2515-can0 dtoverlay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I need some help with the CAN driver, and below is some information.
 
I'm working on a small project that is connecting the CAN MCP2515 into Raspberry Pi which is running AGL OS.
 
These are some information:
- AGL OS: lamprey snapshot version 12.1.0 (I downloaded from this on 3rd June) https://download.automotivelinux.org/AGL/snapshots/lamprey/latest/raspberrypi4/deploy/images/raspberrypi4-64/
- Raspberry Pi 4 - 2GB RAM
- MCP2515 CAN module: https://protosupplies.com/product/mcp2515-can-bus-interface-module
- I followed this guideline to modify the `/boot/config.txt` file to enable spi and mcp driver: https://github.com/tolgakarakurt/CANBus-MCP2515-Raspi
- I ignored all download commands with `apt-install` due to on AGL we could not use those commands.
 
I just focus on these commands:
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=spi-bcm2835
dtoverlay=spi-dma
 
But when I added them into the /boot/config.txt file, my Raspberry Pi could not boot up. The display or the yellow led (next to the red power led) didn't work as normally -> I could not use the `dmesg` command to check what was happened :( .
 
But, if I only enable spi with command: `dtparam=spi=on` . The raspberry could boot up but it didn't recognize the MCP2515 CAN  module when I connected. 
 
To know why it didn't recognize, the tutorial mentioned that it has to create this folder: /sys/bus/spi/devices/spi0.0/net/can0
 
If I tried with Raspbian OS, it works perfectly when I connect the CAN module as tutorial.
 
The question is, how can I add 3 commands left into `/boot/config.txt`. I'm i wrong or do we have other ways to install a driver or something to communicate with the CAN module?
 
I need your help or some tutorial or some guideline about this topic.
 
This is some information logging when RPI could not boot by UART terminal
 

U-Boot 2021.07 (Dec 01 2021 - 22:21:40 +0000)

 

DRAM:  3.7 GiB

RPI 4 Model B (0xc03114)

MMC:   mmcnr@7e300000: 1, emmc2@7e340000: 0

Loading Environment from FAT... OK

In:    serial

Out:   serial

Err:   serial

Net:   eth0: ethernet@7d580000

PCIe BRCM: link up, 5.0 Gbps x1 (SSC)

starting USB...

Bus xhci_pci: probe failed, error -110

No working controllers found

Hit any key to stop autoboot:  0

switch to partitions #0, OK

mmc0 is current device

ERROR : xrealloc failedht2

 

Thank you! 
Best regard,
 
Anh Quan
_._,_._,_

Links:

You receive all messages sent to this group.

View/Reply Online (#9891) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Mute #automotive | Mute #agl
Your Subscription | Contact Group Owner | Unsubscribe [list-automotive-discussions82@xxxxxxxxxxx]

_._,_._,_

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux