khoih-prog / EthernetWebServer_STM32

This is simple yet complete WebServer library for STM32 boards running built-in Ethernet LAN8742A (Nucleo-144, Discovery), ENC28J60 or W5x00 Ethernet shields. The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Ethernet_Generic library is used as default for W5x00. Now W5x00 can use any custom hardware / software SPI
MIT License
88 stars 21 forks source link

LAN8720 #6

Closed Ddh012345dhD closed 3 years ago

Ddh012345dhD commented 3 years ago

Thư viện này có giao tiếp được với LAN8720 không ạ.

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

khoih-prog commented 3 years ago

Thanks for your interests in the library.

Currently, LAN8720 is not supported and I currently have no plan to add the support to it.

But if there are more requests, I certainly will spend some time on the enhancement.

Try to use the more popular W5x00 (better) or ENC28J60 (with EthernetENC library)

khoih-prog commented 3 years ago

I just added the LAN8720 support to STM32F4 and STM32F7 for you to test, using this EthernetWebServer_STM32 library, at STM32_LAN8720.

The test examples are

  1. AdvancedWebServer_LAN8720
  2. UdpNTPClient_LAN8720
  3. UdpSendReceive_LAN8720
  4. WebClientRepeating_LAN8720
  5. WebClient_LAN8720
  6. WebServer_LAN8720

Wiring

LAN8720 PHY --- STM32F4
TX1 <---> PB_13
TX_EN <---> PB_11
TX0 <---> PB_12
RX0 <---> PC_4
RX1 <---> PC_5
nINT/RETCLK <---> PA_1
CRS <---> PA_7
MDIO <---> PA_2
MDC <---> PC_1
GND <---> GND
VCC <---> +3.3V

If tested OK, I'll include them as well as more examples into the new release.

Ddh012345dhD commented 3 years ago

image i tested but IDE warning No such file or directory functional-vlpp.h

khoih-prog commented 3 years ago

You have to read Prerequisites then install all the dependent libraries


Prerequisites

  1. Arduino IDE 1.8.13+ for Arduino
  2. Arduino Core for STM32 v1.9.0+ for STM32 boards. GitHub release
  3. Functional-VLPP library v1.0.2+ to use server's lambda function. To install. check arduino-library-badge
  4. For built-in LAN8742A Ethernet:
  5. For W5x00 Ethernet:
  6. For ENC28J60 Ethernet:
khoih-prog commented 3 years ago

Compile OK for Generic ST32F4 (F407VE, VG, ZE, etc.)

Selection_705

khoih-prog commented 3 years ago

The new release EthernetWebServer_STM32 v1.2.0 has been published to add support to LAN8720 for many STM32F4 and SM32F7 boards.

Have a look at HOWTO use STM32F4 with LAN8720 if you have problem.

It's working reliably and you can see at

AdvancedWebServer_LAN8720 on BLACK_F407VE, using LAN8720 Ethernet and STM32Ethernet Library

AdvancedWebServer_LAN8720


Releases v1.2.0

  1. Add support to LAN8720 Ethernet for many STM32F4 (F407xx, NUCLEO_F429ZI) and STM32F7 (DISCO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG) boards.
  2. Add LAN8720 examples
  3. Add Packages' Patches for STM32 to use LAN8720 with STM32Ethernet and LwIP libraries
khoih-prog commented 3 years ago

Just a note that this solved issue was inadequately mentioned in Support communication LAN8720 #1346