Open MoritzPoehlandt opened 1 month ago
Hi @MoritzPoehlandt! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
I gave this a quick go since I had an ESP32 and a W5500 handy.
There may be an issue in the ESP32 SPI driver when using GPIO chip select emulation, it appears to toggle chip select between each buffer.
Maybe something to do with !ctx->num_cs_gpios
below?
/* keep cs line active until last transmission */
hal_trans->cs_keep_active =
(!ctx->num_cs_gpios &&
(ctx->rx_count > 1 || ctx->tx_count > 1 || ctx->rx_len > transfer_len_frames ||
ctx->tx_len > transfer_len_frames));
@MoritzPoehlandt as a quick workaround you could remove cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
from your overlay to enable automatic chip select (rather than GPIO emulation)
Actually the issue might be that you're enabling both hardware and GPIO emulation chip select.
It works if I remove either from this overlay:
&spim3_default {
group1 {
pinmux = <SPIM3_MISO_GPIO19>,
<SPIM3_SCLK_GPIO18>,
<SPIM3_CSEL_GPIO5>; // <---------- Either remove this
};
group2 {
pinmux = <SPIM3_MOSI_GPIO23>;
output-low;
};
};
&spi3 {
status = "okay";
cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; // <---------- or this
spi_w5500: w5500@0 {
compatible = "wiznet,w5500";
reg = <0x0>;
spi-max-frequency = <10000000>;
int-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
};
};
Thanks for your help. Just needed to add the 'local-mac-address' property as well and now works perfectly. Is this still a bug or more like a feature?
Thanks for your help. Just needed to add the 'local-mac-address' property as well and now works perfectly. Is this still a bug or more like a feature?
@MoritzPoehlandt I would say it is probably just a confusing and difficult to detect misconfiguration.
@sylvioalves what are your thoughts?
Hi, I'm trying to use the Zephyr DHCPv4 sample with an ESP32-WROOM and the W5500 Ethernet shield. I have added the specific overlay and configuration files to the project. These are similar to the Acreli_eth_w5500 Ethernet shield setup, but I'm using the default SPI3 pins for the ESP32.
Logs and console output
Environment (please complete the following information):