Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

entable CAN bus

Featured Replies

@Antillanca you can check out this thread:


Or continue reading here, i'll explain it.
You need to change a few parameters in the boot environment:
sudo armbian-config -> System -> Bootenv
or you can edit the /boot/armbianEnv.txt directly.

Once you are there you need to change the overlay_prefix to:

overlay_prefix=rockchip-rk3588-opi5


Then you need to find the names of overlays, you can get them by running the following in your terminal:

ls -l /boot/dtb/rockchip/overlay

Scroll down and you will see:
pi-overlays.png


So if you want CAN bus and i2c then your Bootenv overlays should look like this:

overlay_prefix=rockchip-rk3588-opi5
overlays=can1-m1 can2-m1 i2c1-m2 i2c1-m4 i2c3-m0 i2c5-m3

Restart your OPi5 for changes to take effect.

If you need wiringPI:

Spoiler

you can currently get it from: https://github.com/orangepi-xunlong/wiringOP/tree/next
(master still doesn't have support for OPi5, next branch does hence why the link to "next")
ReadME doesn't have "gpio read all" for OPi5 so here you go:
OPi5-gpio-readall.png


I have not personally tried CAN bus but it should work, I have tested i2c-1 and it works properly.

@Biohazard777, I have not had problems in the configuration of I2C and SPI in the last version of Armbian, but CAN still does not work. If someone could try enabling it and reviewing the /dev/ directory, it would be very useful, regards.

I've been using CAN on mine for a while, it's pretty solid. Though I made my own overlay (I'm still running a testing image which doesn't seem to have come with the can overlays)

 

For the can1-m1 pins:

 

/dts-v1/;
/plugin/;
/ {
        fragment@0 {
                target = <&can1>;

                __overlay__ {
                        status = "okay";
                        pinctrl-0 = <&can1m1_pins>;
                        assigned-clock-rates = <0x1dcd6500>;
                };
        };
};

 

(note I increased the clockrate to 500MHz there, the default is 200MHz. Dunno if there's any harm, but I've been running like that for a few months without issue)

Edited by terranx

@terranx, excuse my ignorance, but how do you make a custom overlay?

 

'dmesg | grep can' command returns the following error:

rockchip_canfd fea60000.can can0: rockchip_canfd_get_berr_counter RX_ERR_CNT=0x00000000, TX_ERR_CNT=0x00000000

Edited by john antillanca

CAN won't show up in /dev. You'll need to lookup how to setup socketcan stuff. But if you're seeing those dmesg messages, the actual bus is enabled. Annoyingly it does flood dmesg with those messages

 

image.thumb.png.802c9a59ea3bf6a2427dbdc7e4e3d2f6.png

 

image.thumb.png.4161c0d7266bef1ebc2fc85b6cf14d46.png

 

image.thumb.png.0ac664bb8ee3fc4f2832a9f2da099acc.png

Edited by terranx

@terranx  , You are right, I don't know where I got the idea that the device would have to appear in the /dev directory, it helped me to see the command to show the CAN connection, I needed to have it working to start learning, thank you very much.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.