xbean Posted May 23, 2019 Posted May 23, 2019 I am currently trying to set up the PICAN GPS+ACC Rev B on my NanoPi M4 in order to receive CAN connections. I have previously set this up on a Raspberry Pi with no issues, but because the NanoPi does not have /boot/config.txt and /boot/cmdline.txt I am at a loss at how to set up the module. Any information as to how I can go about using the module on the NanoPi would be much appreciated. The guide I used to set up the module on the Raspberry Pi is here http://skpang.co.uk/catalog/images/raspberrypi/pican/PICANGPSACC_V1.pdf Thanks
Igor Posted May 23, 2019 Posted May 23, 2019 4 hours ago, xbean said: I have previously set this up on a Raspberry Pi with no issues, but because the NanoPi Support on most recent boards is not the same as on 10 years old technology. Here such things have to be developed, not just enabled, which is related with (huge) costs. There is no sign of CAN bus support and I am not sure this will be working anytime soon. If you need this feature on this hardware, you will need to invest into R&D ... Or just use a board that supports CAN the way you expect. Allwinner A20 based boards are known to work (but not much of an upgrade from RPi), most likely H3 & H5 as well. For others I can't tell without advanced research.
xbean Posted May 23, 2019 Author Posted May 23, 2019 Thanks for the reply, 15 hours ago, Igor said: There is no sign of CAN bus support and I am not sure this will be working anytime soon. When I said Raspberry Pi I should have specified that it was the Raspberry Pi 3 B+ not the original RPi. Are you saying that there is no support whatsoever for CAN bus on Rockchip RK3399 based SoCs? I have both a NanoPi M4 and a Rock Pi 4 and was going to try and set up the CAN module on either of them. 15 hours ago, Igor said: Or just use a board that supports CAN the way you expect. Allwinner A20 based boards are known to work (but not much of an upgrade from RPi), most likely H3 & H5 as well Do these boards function the same was as the RPi 3B+? As in, is it the same method to activate the overlays by adding the lines below to the /boot/config.txt file? dtparam=i2c_arm=on dtparam=spi=on enable_uart=1 dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 dtoverlay=spi-bcm2835-overlay Thanks
Igor Posted May 23, 2019 Posted May 23, 2019 14 minutes ago, xbean said: When I said Raspberry Pi I should have specified that it was the Raspberry Pi 3 B+ not the original RPi. And what exactly was changed since original design from 2009? 15 minutes ago, xbean said: Are you saying that there is no support whatsoever for CAN bus on Rockchip RK3399 based SoCs? Yes, it looks that way. 15 minutes ago, xbean said: Do these boards function the same was as the RPi 3B+? As in, is it the same method to activate the overlays by adding the lines below to the /boot/config.txt file? Yes, Allwinner is well covered. It started back in 2017 and there are some for older Rockchips and Amlogic. If you only need to enable with default parameters, its even more simple -> armbian-config -> system -> hardware configuration
chrisf Posted May 23, 2019 Posted May 23, 2019 It should be possible to use a SPI CAN module, as long as you can get the SPI interface enabled and the kernel driver loaded. I imagine you'll need to do something with the device tree to enable it. I don't know if the default kernel has the mcp2515 driver built in though. You may need to compile your own kernel module or kernel. Edit: I see Igor has already posted how to enable SPI
Recommended Posts