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

Can't get it to play with POE Ethernet #3308

Open
DrJaymz opened this issue May 3, 2024 · 2 comments
Open

Can't get it to play with POE Ethernet #3308

DrJaymz opened this issue May 3, 2024 · 2 comments

Comments

@DrJaymz
Copy link

DrJaymz commented May 3, 2024

I am using a Olimex ESP32-POE-ISO board which has Ethernet. The ethernet uses LAN8720 over the RMII interface - but I don't know that much about how it works.

I am using the following config for a TFT display:

-DUSER_SETUP_LOADED=1
-DILI9341_DRIVER=1 ; Switch to ILI9341
-DTFT_WIDTH=240 ; Set width to 240 pixels
-DTFT_HEIGHT=320 ; Set height to 320 pixels for ILI9341
-DTFT_RST=4
-DTFT_CS=16
-DTFT_DC=2
-DTFT_MOSI=15
-DTFT_SCLK=14
#-DUSE_HSPI_PORT=1
-DSUPPORT_TRANSACTIONS=1

And the good news is that the Display works perfectly. The bad news is that it kills the Ethernet stone dead. So when pinging it dies as soon as tft.init() is called. I put a 5 second delay in my setup so that you can see the pings working until init is called.

If I have USE_HSPI_PORT then ethernet dies and displays the message Eth disconnected. If let it use VSPI then I don't see that message but it still kills the ethernet but the lights stay on - so only half dead then. I turned on transactions because it says you need that IF you are sharing the SPI bus. Well, my understanding is that actually the LAN8720 interface actually doesn't use SPI - but clearly SPI contention of some form is the issue here and it makes sense if I remapped HSPI during the INIT that would break it. But what is VSPI's excuse?

I could post the code but nothing really interesting, I have the above config and then I just call tft.ini() and write hello world and that works. For ethernet, there's an eth.init() and thats about it. I poked into the eth.c and eth.h and they do have configs for multiple implementations which DO use SPI but not the one I'm using.

https://github.com/OLIMEX/ESP32-POE-ISO/blob/master/HARDWARE/ESP32-PoE-ISO-Rev.K/ESP32-PoE-ISO_Rev_K.pdf <-- here is the schematic so you can see where my pins are and which ones it uses for ethernet.

At the rate this project is going, I'm going to end up using two serially connected ESP32's and I cannot bring myself to do that. No shower is long enough to make me feel clean after that cludge.

@kapyaar
Copy link

kapyaar commented May 3, 2024

Are you using the ETH SPI from ESP32? If so, It is likely the SPI conflict. I have raised this question in the discussion. See
#3298

@DrJaymz
Copy link
Author

DrJaymz commented May 3, 2024

Possibly
~platformio\packages\framework-arduinoespressif32\libraries\Ethernet\src\ETH.cpp

But SPI shouldn't be in play in my scenario. I wondered if it was some shared interrupt or something.

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