DESK-XZ7-L/Peripherals/CAN

From DAVE Developer's Wiki
< DESK-XZ7-L
Revision as of 09:30, 24 January 2024 by U0028 (talk | contribs) (Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
History
Issue Date Notes
2023/01/23 DESK-XZ7-L-1.0.1 release


CAN[edit | edit source]

CAN is available on the J24 connector. This device is routed through the PL.

Physical device Processor's resource Connector Type Notes
CAN BUS CAN0 J24 differential CAN bus

The following commands can be issued from command line in order to send and receive CAN frames:

root@bora:~# dmesg | grep -i can
[    0.545770] CAN device driver interface
[    0.752012] can: controller area network core
[    0.761010] can: raw protocol
[    0.763989] can: broadcast manager protocol
[    0.768236] can: netlink gateway - max_hops=1
root@bora:~# canconfig can0 stop
can0 state: STOPPED
root@bora:~# canconfig can0 bitrate 500000
can0 bitrate: 500000, sample-point: 0.875
root@bora:~# canconfig can0 start
can0 state: ERROR-ACTIVE
root@bora:~# candump can0 &
[1] 298
root@bora:~# interface = can0, family = 29, type = 3, proto = 1

root@bora:~# cansend can0 -i 0x7ff 00 01 02 03 04 05 06 07
interface = can0, family = 29, type = 3, proto = 1
<0x7ff> [8] 00 01 02 03 04 05 06 07
<0x000> [8] ff fe fd fc fb fa f9 f8
root@bora:~# cansend can0 -i 0x7ff 00 01 02 03 04 05 06 07
interface = can0, family = 29, type = 3, proto = 1
<0x7ff> [8] 00 01 02 03 04 05 06 07
<0x000> [8] ff fe fd fc fb fa f9 f8
root@bora:~# cansend can0 -i 0x7ff 00 01 02 03 04 05 06 07
interface = can0, family = 29, type = 3, proto = 1
<0x7ff> [8] 00 01 02 03 04 05 06 07
<0x000> [8] ff fe fd fc fb fa f9 f8
root@bora:~#