Alternative Set-Up - Sferalabs Iono Pi Max Series User Manual

Hide thumbs Also See for Iono Pi Max Series:
Table of Contents

Advertisement

$ dtc -@ -Hepapr -I dts -O dtb -o ionopimax-can-fd.dtbo ionopimax-can-fd.dts
$ sudo cp ionopimax-can-fd.dtbo /boot/overlays/
$ cd mcp25xxfd
$ sudo ./install.sh
Add to /boot/config.txt the following line:
dtoverlay=ionopimax-can-fd
Reboot:
$ sudo reboot
After reboot you should see a new "can0" interface available:
$ ifconfig -a
...
can0: flags=193<NOARP>
mtu 16
...
You can now use the SocketCAN framework to control the CAN interface.
Following some examples to enable and test CAN FD communication.
Initialize "can0" specifying communication parameters and enabling the CAN FD protocol:
$ sudo ip link set can0 up type can bitrate 1000000 dbitrate 8000000 restart-ms
1000 berr-reporting on fd on
$ sudo ifconfig can0 txqueuelen 65536
Dump data from the bus:
$ candump can0
Generate random traffic:
$ cangen can0 -mv

Alternative set-up

If you are using other Operating Systems or need not to use the provided drivers, you can
access all the functionalities of Iono Pi Max via dedicated GPIO pins, the I
2
C bus and the
SPI interface.
All the features directly controlled via GPIO, such as digital inputs and watchdog control,
can be accessed using any of the standard methods provided by the operating system or
any available library for your programming language or framework of choice.
Make sure the GPIO pins are correctly configured as inputs or outputs, depending on the
function and no pull-up/pull-down is enabled.
All features of Iono Pi Max controlled via I
C are accessible at the address 0x35 on bus 1
2
("i2c-1" - GPIO2/SDA1 and GPIO3/SCL1).
The RTC (MCP79410) is directly accessible at address 0x6f on bus 1.
The CAN controller (MCP2518FD) is connected to the SPI interface chip select 0 ("spi0.0"
- GPIO8-11) and the interrupt signal (INT) to GPIO28.
Refer to the next chapter for details about each feature.
23
Iono Pi Max User Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Iono Pi Max Series and is the answer not in the manual?

Table of Contents