xTakeSemaphore and SPI Ethernet (w5500) in ethernet/basic example
Posted: Wed Feb 03, 2021 5:07 pm
Using IDF 4.3-dev with the debug compiler option from the menu I have a working example using an SPI-connected W5500 ethernet module wired to the default pins for SPI3 - the example starts up, configures the mac and phy and gets an IP address but only if I use an SPI bus speed of 32MHz. I can then send and receive without issue. If I move to any other of the compiler options I end up with WDT issues which I have tracked down to an xTakeSemaphore call in esp_eth_mac_w5500.c, called from w5500_read(). I did search around a bit and saw some discussion around making sure tasks get pinned to cores so I modified the example to pin everything to a single core and the issue persists. If I change the SPI bus speed I get reboot loop and/or SPI communication issues.
To be sure that there's no an issue in 4.3-dev I retro-graded to 4.2-release and the ethernet/basic example with a w5500 connected has issues with communication to the w5500 prior to the read call. I have tried all compiler options and I have tried various SPI speeds and can seem to find no winning combination.
Overall I'm okay with using 4.3-dev so I am more keen on inquiring if anybody has faced the issue with xTakeSemaphore and SPI ethernet modules and if so was there a resolution found for the issue?
Thanks!
To be sure that there's no an issue in 4.3-dev I retro-graded to 4.2-release and the ethernet/basic example with a w5500 connected has issues with communication to the w5500 prior to the read call. I have tried all compiler options and I have tried various SPI speeds and can seem to find no winning combination.
Overall I'm okay with using 4.3-dev so I am more keen on inquiring if anybody has faced the issue with xTakeSemaphore and SPI ethernet modules and if so was there a resolution found for the issue?
Thanks!