Seems that BananaPi M2 Zero has some problems enabling SPI while running various operational systems. I’ve tried a couple Raspbian, with no success. The one that seems to work is the Armbian_21.08.1_Bananapim2zero_bullseye_current_5.10.60.img
, found in Armbian archives and here. (If there are any other newer versions that works SPI please reply me.)
The next thing to do is edit the armbianEnv.txt
with this prompt:
sudo nano /boot/armbianEnv.txt
You should append this to the file:
overlays=spi-spidev
param_spidev_spi_bus=0
Remember to do not use more than one overlays=
line. After rebooting, you should have SPI working.
Now, in my case, in trying to use CAN mcp2515 module with my BPI-M2Z. I followed this tutorial to add a can0
overlay. In every tutorial on the internet about mcp2515, they say to git install WiringPi, which is not possible for the current version and used os image, many errors, impossible to install. I installed this, which seems to work for a sister board and the prompt gpio readall
seems to work fine.
This is the far I could get, the can-utils
lib seems to conflict with my overlays settings, and no CAN network can be found. I am surely missing something but I dont know.