art100
Posts: 3
Joined: Sun Sep 02, 2018 8:35 am

SPI1 mcp2515

Sun Sep 02, 2018 10:42 am

A have
hard https://www.raspberrypi.org/products/ra ... el-b-plus/
soft https://downloads.raspberrypi.org/raspbian_latest
hard SPI0.0 mcp2515 to work ok :D
hard usb arduino mcp2515 to work ok :D
SPI1.0 1.1.1.2 question :o
This is linux rasbian on raspberry pi 3 B+ have device tree overlay? ok
my step by step command on this is linux http://art1.by/raspberrypi/20180902rasp ... oot.sh.txt
my hardware http://art1.by/raspberrypi/

Code: Select all

[email protected]:/sys/bus/spi/devices# dmesg | grep spi
[    5.362136] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[email protected]:/sys/bus/spi/devices# ls /dev | grep spi
spidev0.1
spidev1.0
spidev1.1
spidev1.2
[email protected]:/sys/bus/spi/devices# dmesg | grep spi
[    5.362136] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[email protected]:/sys/bus/spi/devices#
Where initialisation SPI1.0 SPI1.1 SPI1.2 ChipSelect pin36 Interrup pin38 ? :o
see error compile

Code: Select all

[email protected]:/home/pi/Downloads/workcan# ./0compilereboot.sh
mcp2515-can3.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
mcp2515-can3.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
mcp2515-can3.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
mcp2515-can3.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
mcp2515-can3.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
Questions:
1. where to read the overlay settings?
2. where to read setting pin Chip Select SPI in https://github.com/raspberrypi/linux/bl ... verlay.dts?
3. what is this setting in source?

Code: Select all

 row 62 interrupts = <25 0x2>;
??? 0x2 ???
4 spi0.0 on "raspberry pi 3 b+" to work ok
5 spi1.0 on "raspberry pi 3 b+" to work?

art100
Posts: 3
Joined: Sun Sep 02, 2018 8:35 am

Re: SPI1 mcp2515

Sun Sep 02, 2018 7:22 pm

see 6.2 Alternative Function Assignments https://www.raspberrypi.org/app/uploads ... herals.pdf
mayby UART mayby SPI1
ok
raspi-config
interfaces
serial
no
ok

Chip Select SPI1.0 default no GPIO16
Chip Select SPI1.0 default GPIO18
pin to change
ok
Image
Image
spi0.0 can bus the flow is disassembled for parts
spi1.0 spi1.1 spi1.2 not initialisation
Image

[email protected]:~ $ ls /dev | grep spi
spidev0.1
spidev1.0
spidev1.1
spidev1.2
[email protected]:~ $ dmesg | grep spi
[ 5.355639] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[email protected]:~ $
spi1.0 spi1.1 spi1.2 not initialisation :roll:

What to read on rasbian raspberry pi 3 B+ SPI1.0 ? :roll:

art100
Posts: 3
Joined: Sun Sep 02, 2018 8:35 am

Re: SPI1 mcp2515

Sun Sep 02, 2018 8:03 pm

Question:
1.This is source right?

spi1.2

# gnd pin40 - on chips
# GPIO21 pin39 clock - on chip SCK SPI
# GPIO20 pin38 MOSI - on chip SI SPI
# GPIO26 pin37 inerrupt - from chip INT SPI
# GPIO18 pin36 chip select - on chip CS SPI
# GPIO19 pin35 MISO - on chip SO SPI
# 3,3v pin2 - on mcp2515 3.3v on chip SPI
# 5v pin1 - on chip 5v can bus

http://art1.by/raspberrypi/20180902rasp ... ay.dts.txt

Kick your feet. Where to dig? : -0
Tanks.

Return to “Device Tree”