Skip to content

Ethernet with STM NUCLEO-F429ZI #3878

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

Closed
Abdelrahman-Elnaggar opened this issue Jun 19, 2018 · 9 comments
Closed

Ethernet with STM NUCLEO-F429ZI #3878

Abdelrahman-Elnaggar opened this issue Jun 19, 2018 · 9 comments
Labels
enhancement Feature requests, new feature implementations port-stm32

Comments

@Abdelrahman-Elnaggar
Copy link

Hello,
I would like to ask if the Ethernet connection is supported with STM NUCLEO-F429ZI ?
If it is supported is there is any sample code or anything that could help me to start using it ?
i would really appreciate any help.
thanks in advance

@dpgeorge
Copy link
Member

There is preliminary support for ETH in PR #3808. It gets ETH working with two F7 boards. It should be pretty straightforward to take that PR and add support for the NUCLEO-F429ZI, it just requires updating the board config files.

@dpgeorge dpgeorge added enhancement Feature requests, new feature implementations port-stm32 labels Jun 19, 2018
@Abdelrahman-Elnaggar
Copy link
Author

thanks dpgeorge so much for your help ,as i will start updating the board config files ,
but do you know any sample code or guide on how to write a simple code to test the Ethernet after i update the files ??
i would really appreciate the help.

@dpgeorge
Copy link
Member

but do you know any sample code or guide on how to write a simple code to test the Ethernet after i update the files ?

The "usual" way of using networking in MicroPython should just work with the Ethernet, see eg http://docs.micropython.org/en/latest/pyboard/library/network.html#module-network

For example:

import network
eth = network.Ethernet()
eth.active(1)
eth.ifconfig('dhcp')
import socket
socket.getaddrinfo('micropython.org', 80) # should return the correct IP address of this site

@Abdelrahman-Elnaggar
Copy link
Author

The "usual" way of using networking in MicroPython should just work with the Ethernet, see eg http://docs.micropython.org/en/latest/pyboard/library/network.html#module-network

For example:

import network
eth = network.Ethernet()
eth.active(1)
eth.ifconfig('dhcp')
import socket
socket.getaddrinfo('micropython.org', 80) # should return the correct IP address of this site

But when i write eth = network.Ethernet() in the serial prompt i get this error :
AttributeError: 'module' object has no attribute 'Ethernet'

@dpgeorge
Copy link
Member

But when i write eth = network.Ethernet() in the serial prompt i get this error ...

You need to make sure you have pulled the PR #3808 and in the config file for your new board put #define MICROPY_HW_ENABLE_ETH_RMII (1)

@Abdelrahman-Elnaggar
Copy link
Author

i made all the changes in the config files and when i run the make command i got these errors

35629349_10155466677132256_7384763109430263808_n

but i managed to solve these errors by changing the address
and the second error SCB_CleanInvalidateDcache(); i found out that this function is specific for f7 boards so i commented this line, and i managed to get the firmware correctly.

but when i tried to write:
eth = network.Ethernet()
in the serial prompt i get the same error as before
AttributeError: 'module' object has no attribute 'Ethernet'

untitled

is there is a specific way to connect to the Ethernet or my approach to solve the above errors (from make command) was wrong
as i don't know where is the problem.

@dpgeorge
Copy link
Member

but i managed to solve these errors by changing the address
and the second error SCB_CleanInvalidateDcache(); i found out that this function is specific for f7 boards so i commented this line,

That sounds correct.

in the serial prompt i get the same error as before
AttributeError: 'module' object has no attribute 'Ethernet'

I'm not sure what is wrong here. If you can please post your code (all the additional files you added and any changes you made to existing files) then it will be easier to debug it.

@Abdelrahman-Elnaggar
Copy link
Author

thank you @dpgeorge for your help as i managed to solve the problem by writing these two commands to get the firmware:
make -C mpy-cross
make -C ports/stm32 MICROPY_HW_ENABLE_ETH_RMII=1 BOARD=NUCLEO_F429ZI

and upload it normally to the board

tannewt added a commit to tannewt/circuitpython that referenced this issue Jan 21, 2021
@YO3HCM
Copy link

YO3HCM commented Mar 29, 2022

Hi everyone,
I just put micropython on my STM32F767ZI nucleo board. Basic examples worked fine.
I tried ethernet, and I get a timeout on the third line:

import network
eth = network.Ethernet()
eth.active(1)

Do you have any advice?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, new feature implementations port-stm32
Projects
None yet
Development

No branches or pull requests

3 participants