-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
knock-off LAN8270 board on STM32F407VET6 black board #6795
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
Comments
I got the same problem on STM32F407ZGT6 board, but on STM32H7 board it works well. |
Good to see that I'm not the only one, but there is no solution yet. |
You can remove the pull-up resistance of the 10 pin of the lan8720. Most of the purchased modules have the default phyaddr set to 1,407 MPY firmware needs to be 0 by default I'm trying to modify the firmware and add the parameter input of phyaddr |
Check PR #13422. There was invalid clock config. |
Can you share configure on stm32h7? |
Below is a set of Pins I used with a STM32F750 and STM32F743 to test LAN8720 support :
These pin have to be connected to the respective pins of the LAN8270. The python snippet to start it is:
|
Do you have any special HW requirements for the LAN8720? any resistor to remove? I have the sample from Waveshare. my mpconfigboard.h include:
and mpconfigboard.mk have:
I'm using STM32H743VIT6 |
I use a |
Hi Robert,
then I run again the command:
But when I ping it from my PC no reply:
I ran the full code you provided and the code is stuck at the while loop and can't get any connection. should I run any SW on the PC? What am I doing wrong? |
Hi @roizano! If the you got as defualt address is Thanks! |
These are just the default settings of the driver, and if you change them, the chaged values are reported. That does not indicate the the interface is active. |
Hi,
I used clock configuration:
didn't work... and I tried also:
also no success ... |
Hi Robert, |
Very worth looking #13406 |
@roizano : The fact that the orange led turns off and on again confirms, that the MDIO interface is working and the phy_addr is the right one. That's good. Status 2 means, that the interface is up but did not receive an IP address. You could try to set a proper IP address at this state with lan.ifconfig(). But I doubt that this will work. |
@roizano Which board do you use? |
Hi @robert-hh , The clock is as configured in stm32h7xx_hal.h
@ukicomputers The module of LAN8720 is from : http://www.waveshare.com/wiki/LAN8720%20ETH%20Board See my main package: |
That's strange. I have the same configuration here an it works, verified again just now. Can you test whether you have a RefCLK signal? I have attached the firmware image I used for the test, both the .dfu and .bin file. |
After all things, seems like it's not problem to the clock, because link to board sent by @roizano contains an internal 50MHz clock source (on board). Left issues:
|
Hi @ukicomputers , |
I have the board, PC and router connected to a switch. The router runs a DHPC service. Does the green LED on the interface show activity? If yes, then the LAN wiring works at the lower protocol levels. |
The green LED blinks for a second and then off completely . I will buy new STM32H743VIT6 from Weact studio as this might have issues. @robert-hh , what module of LAN8720 do you have? I'm thinking that the clock of the PHY is on my board and not from the STM32 maybe need to change the configuration ?
|
That configuration is right: I have the same EThernet breakout, with RefClk being supplied from the LAN8720. If the wiring is right, the green LED should start flickering as soon as there is power to the LAN8720. Green LED means LAN activity. Orange LED on indicates the network speed. How do you connect the LAN8720 to your Ethernet? |
This is the setup: |
So you have a direct connection to the PC. Then there is most likely no DHCP server active, and you have to set a manual IP address for the LAN8720. You have to try, whether lan.ifconfig() is to be called before or after lan.active("True"). lan.ifconfig(("192.168.0.99", "255.255.255.0", "192.168.0.1", "8.8.8.8")) With the IP address manually set, lan.status() should be 3. Then you should be able to "ping" the LAN8720 from the PC. You should not need a cross-cable. |
@robert-hh
when I ping:
over Wireshark I can see that I'm trying to check if there is respond from 192.168.0.99 but no respond... |
@robert-hh - until I will get my new STM32H743VIT6. |
Actually I used the same build process and board files as for the H743 receiving a single firmware.bin file with a size of 550k. For flashing I just put the board into bootloader mode by pushing the boot0 switch and then reset, and used the |
Hi @robert-hh , |
By data sheet the H750 requires a different flash layout than the H743. The fact that the H743 firmware runs on my H750 is pure chance and cannot be expected. So for the H750 the code has to be split in two parts. Some of that, especially the boot up code, at address 0x8000000, the other parts at address 0x9000000 in the external QSPI flash. The flash file system size has to be decreased, the startup code has to be aligned to enable the external flash for code execution and the flash file system has to be decreased. So better wait for the new H743. |
@robert-hh - The new product is here and all is working :) I dropped the usage of STM32H750 Thank you! |
That sounds good. It would be interesting what is wrong with the other board. You could try the Ethernet Pins on that board by using them as GPIO output and see, if toggling them appears at the respective board connector pins. If that all works, the MCU may be defective. |
Sounds like the problem got fixed. Proposing to close this issue :) |
I've been trying to get a knock-off LAN8270 board to work on my STM32F407VET6 black board.
I have this board
https://os.mbed.com/users/hudakz/code/STM32F407VET6_Hello/
Which I have compiled MicroPython for using this config
https://github.com/mcauser/BLACK_F407VE
MicroPython works just fine but I cannot get the LAN8270 board to enable.
The network.LAN module doesn't take an arguments on STM32 and when I try to enable the network this is what I get:
I checked if the LAN8270 board isn't faulty by connecting it to an ESP32 MicroPython board and it works like it should.
Checked config files, pin definitions and everything else I could find. Can't seem to find an answer on how to fix it.
Any tips on what I could be doing wrong?
Reference: mcauser/BLACK_F407VE#6 (comment)
The text was updated successfully, but these errors were encountered: