skycryer
(Skycryer)
March 10, 2025, 5:14pm
1
I have a module I want to add to and Waveshare ESP32-S3 ETH Development Board. When I add the code for the can bus module and ethernet I get an error
spi
component is using interface ‘SPI2_HOST’. To use W5500, you must change the interface
on the spi
component.
But even when I change the interface on spi I get the same errors as I is ignoring the setting.
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
spi:
id: McpSpi
interface: spi
clk_pin: GPIO18
mosi_pin: GPIO11
miso_pin: GPIO12
ethernet:
type: W5500
clk_pin: GPIO13
mosi_pin: GPIO11
miso_pin: GPIO12
cs_pin: GPIO14
interrupt_pin: GPIO10
reset_pin: GPIO9
No idea what the problem is, anyone having an idea? I need the ethernet support and the canbus because wifi is not available at the location I need to control something with canbus.
zoogara
(Daryl)
March 10, 2025, 10:01pm
2
Not sure about your issue - but why is interface:
defined twice in this yaml block?
skycryer
(Skycryer)
March 10, 2025, 10:10pm
3
that was a copy paste error, it is not there in my latest code.
1 Like
skycryer
(Skycryer)
March 12, 2025, 8:22am
4
Ok seems I need to use a different spi channel for the can bus module but I do not know what GPIOs are the correct ones.
There is also a technical documentation but I do not understand it
At around page 19 the GPIO Documentation is located maybe someone here can help
See the interface selection section in the docs - SPI Bus — ESPHome
Use spi3
for the non-ethernet SPI config. Choose whatever pins you like for that interface, but not the ones used by the ethernet.
skycryer
(Skycryer)
March 12, 2025, 3:06pm
6
I tried like this but still getting error can bus module marked as failed-
#########################################
# #
# SPI configuration #
# #
#########################################
spi:
id: McpSpi
clk_pin: GPIO39
mosi_pin: GPIO40
miso_pin: GPIO41
interface: spi3
#########################################
# #
# CAN configuration #
# #
#########################################
canbus:
- id: !extend wp_can
platform: mcp2515
spi_id: McpSpi
cs_pin: GPIO15
bit_rate: 20kbps
skycryer
(Skycryer)
March 12, 2025, 3:24pm
7
OK does work now, reason after this changes was also I did connect it to 3v3 no 5v pin so the can bus module did not get enough power I think.
1 Like