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! |
|
have you built a micropython version with rmii support? if so, what happens when you attempt lan setup? |
|
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. |
|
link missing a '.' in the first A.5 section, replace the make command with: program per usual. i use st-flash on mint linux |
|
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! |
|
Build process, could see a an error about usocket, I avoided it for now: 2nd attempt |
|
hi abin, starting with a clean slate, these commands appear to work good luck, clay |
|
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 ?
|
|
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? |
|
do you have a dhcp server on the segment? ADDR="172.16.32.2" try pinging from computer |
|
Looks like NIC on Ubuntu-PC is not getting MAC of the board. Its trying the ARP. pyboard is configured as: |
|
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 |
|
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. |
|
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? |
|
ifconfig on Ubuntu |
|
can you show the results from linux for ping 172.16.32.2 on my nucleo boards, i do |
|
ping trials Timedout |
|
also, verify mask - i'm was octet off on the 248 (edited...) looks like you have it correct: 255.255.255.248 |
|
does your wireshark trace show 172.16.32.2 in the arp request? it may be time to start rechecking wiring |
|
trace looks correct. at this point, i'd revisit the wiring/pin definitions |
|
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 |
|
not sure. i do not do that for the nucleo boards - could be predefined not sure where PHY_DP83848 definition is |
|
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 |
|
lan.status() ? |
|
this is on a nucleo board... check your output with wireshark |
|
Something is strange about the status() with my connections. As a result socket didn't work.
|
|
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? |
|
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 |
|
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>
|



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!!
All reactions