Using PHY module DP83848 with Micropython #10141
Replies: 31 comments 18 replies
-
a "few jumpers" could stand some details... to enable comms, you may need something like: this fails to build on my system: import network lan.ifconfig((ADDR,MASK,GWAY,DNS)) my .02 worth: good luck! |
Beta Was this translation helpful? Give feedback.
-
have you built a micropython version with rmii support? if so, what happens when you attempt lan setup? |
Beta Was this translation helpful? Give feedback.
-
How exactly can I flash micropython with RMII support ? I did not quite follow the codes in the first message. Till now I followed steps shown here to build the mpython board. |
Beta Was this translation helpful? Give feedback.
-
link missing a '.' in the first A.5 section, replace the make command with: program per usual. i use st-flash on mint linux
|
Beta Was this translation helpful? Give feedback.
-
ok - it appears some definitions are missing from the STM32F4DISC setup to enable rmii ethernet in directory boards/STM32F4DISC add to the end of pins.csv
add to the end of mpconfigboard.h
add to the end of mpconfigboard.mk
build with load fw with preferred method this fails because i don't have the phy hardware:
again, i'd recommend one of the nucleo boards mentioned above good luck! |
Beta Was this translation helpful? Give feedback.
-
Build process, could see a an error about usocket, I avoided it for now: 2nd attempt
|
Beta Was this translation helpful? Give feedback.
-
hi abin, starting with a clean slate, these commands appear to work good luck, clay
|
Beta Was this translation helpful? Give feedback.
-
Some success!! As suggested, I tried the fresh build, used the same dfu-util to flash the firmware though, not st-link method. After flashing,
I have not built RMII into pyboard yet. Do I need to do it after the previous flash ?
|
Beta Was this translation helpful? Give feedback.
-
you should be ready to go MICROPY_PY_ETH=RMII is not needed: i used this on another board several years back... can you plug into a switch and get a link indication? what does lan.ifconfig() show? |
Beta Was this translation helpful? Give feedback.
-
do you have a dhcp server on the segment? ADDR="172.16.32.2" try pinging from computer |
Beta Was this translation helpful? Give feedback.
-
Looks like NIC on Ubuntu-PC is not getting MAC of the board. Its trying the ARP. pyboard is configured as:
|
Beta Was this translation helpful? Give feedback.
-
There is no DHCP server configured on PC. How to let Ubuntu know STM32's MAC ? https://www.youtube.com/watch?v=EjOinds1f18&ab_channel=TKJElectronics. Watch at time: 2:48 |
Beta Was this translation helpful? Give feedback.
-
When I ping a single packet(when it's ARPing) from Ubuntu-PC all the way to board, I see LED blink on the DP83848 RJ45 connector.
|
Beta Was this translation helpful? Give feedback.
-
RUNNING flag indicates exchanging link pulses with another device. a first check for wiring or mdi/mdi-x issues your arp does not look right. i'd expect 172.16.32.2 to be in the packet
what does ifconfig show for your ubuntu interface? |
Beta Was this translation helpful? Give feedback.
-
ifconfig on Ubuntu
|
Beta Was this translation helpful? Give feedback.
-
can you show the results from linux for ping 172.16.32.2 on my nucleo boards, i do |
Beta Was this translation helpful? Give feedback.
-
ping trials
Timedout
|
Beta Was this translation helpful? Give feedback.
-
also, verify mask - i'm was octet off on the 248 (edited...) looks like you have it correct: 255.255.255.248 |
Beta Was this translation helpful? Give feedback.
-
does your wireshark trace show 172.16.32.2 in the arp request? it may be time to start rechecking wiring |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
trace looks correct. at this point, i'd revisit the wiring/pin definitions |
Beta Was this translation helpful? Give feedback.
-
DO we need to define, driver objects. https://docs.micropython.org/en/latest/library/network.LAN.html?highlight=network%20lan There is some reference shown here to PHY_DP83848 |
Beta Was this translation helpful? Give feedback.
-
not sure. i do not do that for the nucleo boards - could be predefined not sure where PHY_DP83848 definition is |
Beta Was this translation helpful? Give feedback.
-
there are a few DP83848 references in other ports. it looks like you may be in charge of phy setup if you want to continue with the dp83848 what does lan.active(True) return if it does not timeout, i'd guess that you are talking to the phy
|
Beta Was this translation helpful? Give feedback.
-
lan.status() ?
|
Beta Was this translation helpful? Give feedback.
-
this is on a nucleo board... check your output with wireshark
|
Beta Was this translation helpful? Give feedback.
-
Something is strange about the status() with my connections. As a result socket didn't work.
|
Beta Was this translation helpful? Give feedback.
-
not sure. i did some digging and, without a parameter, it is the link status. haven't found a meaning for the values. may require a dive into the datasheets stm32/eth.c calls out values for lan8742 phy. you may be able to replace them with appropriate dp83848 values can you move from the f4disco board? |
Beta Was this translation helpful? Give feedback.
-
a nucleo 767 board should let you get the network up quickly and move onto the meat of the project i used your current hw combination ~10 years ago with nuttxos. it looks like there was some attempt to port that work to micropython good luck |
Beta Was this translation helpful? Give feedback.
-
Hi, I could not solve it. Try if you have time, and less resources, you
could get it. Good luck!
…On Fri, 21 Jun 2024, 16:19 RichardWei, ***@***.***> wrote:
Hi, I have a similar problem, did you solve it in the end with stm32f407?
—
Reply to this email directly, view it on GitHub
<#10141 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF3CEGBIPUWKI2EQ3ILV4HTZIRAADAVCNFSM6AAAAABJWFPTR2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TQNBRGIYTI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to make use of Micropython with PHY module DP83848, connected to STM32F407.
IP address need to be assigned to pyboard(STM32F407),it could be Static or DHCP.
Physical connection:
[STM32F407]---------few Jumpers ---------[DP83848]-RJ45--------------------Ethernet cable---------------------RJ45-[Laptop(Ubuntu)]
STM32F407 is already flashed with Micropython.
Any ideas are welcome!!
Beta Was this translation helpful? Give feedback.
All reactions