Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RS485 not working #1

Open
wasn-eu opened this issue Aug 17, 2023 · 4 comments
Open

RS485 not working #1

wasn-eu opened this issue Aug 17, 2023 · 4 comments

Comments

@wasn-eu
Copy link

wasn-eu commented Aug 17, 2023

Hi

first thank you for your great work.
But i have a problem that i could not use the rs485 because of a gpio conflict:
`root@raspberrypi4:~# dmesg | grep -i '(can|spi)

[ 4.428624] pinctrl-bcm2835 fe200000.gpio: pin gpio19 already requested by fe200000.gpio; cannot claim for fe215080.spi
[ 4.443245] pinctrl-bcm2835 fe200000.gpio: error -EINVAL: pin-19 (fe215080.spi)
[ 4.463172] spi-bcm2835aux fe215080.spi: error -EINVAL: Error applying setting, reverse things back
[ 4.473534] spi-bcm2835aux: probe of fe215080.spi failed with error -22
[ 5.310065] CAN device driver interface
[ 5.355077] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[ 20.178960] can: controller area network core
[ 20.407351] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[ 22.105419] can: raw protocol
`

I have the latest stable venus os large installation on a raspberry pi 4.

@wasn-eu
Copy link
Author

wasn-eu commented Aug 17, 2023

as i can see the changes for digital input 4 are acitve:

digital_input_4 -> /sys/class/gpio/gpio22

but what else is now using gpio19?

@wasn-eu
Copy link
Author

wasn-eu commented Aug 17, 2023

i had to comment this line out in the file /u-boot/config.txt
dtoverlay=VenusGpioOverlay

than the /dev/ttySC0 and ttySC1 devices are created.
but i get these errors:

`root@raspberrypi4:~# dmesg | grep spi

[ 2.780497] spi-bcm2835aux fe215080.spi: cs2 >= max 1
[ 2.780551] spi_master spi1: spi_device register error /soc/spi@7e215080/spidev@2
[ 2.780603] spi_master spi1: Failed to create SPI device for /soc/spi@7e215080/spidev@2
[ 2.780673] spi-bcm2835aux fe215080.spi: cs1 >= max 1
[ 2.780714] spi_master spi1: spi_device register error /soc/spi@7e215080/spidev@1
[ 2.780763] spi_master spi1: Failed to create SPI device for /soc/spi@7e215080/spidev@1
[ 2.780837] spi-bcm2835aux fe215080.spi: chipselect 0 already in use
[ 2.780879] spi_master spi1: spi_device register error /soc/spi@7e215080/spidev@0
[ 2.780927] spi_master spi1: Failed to create SPI device for /soc/spi@7e215080/spidev@0
[ 3.543091] spi1.0: ttySC1 at I/O 0x1 (irq = 66, base_baud = 921600) is a SC16IS752
[ 3.626494] mcp251x spi0.0 can0: MCP2515 successfully initialized.
`

@herrfrei
Copy link
Owner

herrfrei commented Dec 8, 2023

Hi @wasn-eu ,

sorry for the long delay but I realized right now that there is an open issue. Did you find out where the problem results from (what overlay uses GPIO19)? I have no idea - my rpi 3 works without any problems.

Regards,
herrfrei

@herrfrei
Copy link
Owner

herrfrei commented Dec 8, 2023

Ah,

right now I saw the possible reason: Did you install https://github.com/kwindrem/RpiGpioSetup? This uses different GPIO pins (5 6 13 16 19 26) and MUST NOT be installed together with my addon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants