cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between two stm32f407 with Ethernet

Ash1
Associate III

Hi all 

I am trying to understand how can I send data and recieve ,,Can you share any example code or something.

I am sharing my project can you so confirm me is configuration is correct.

B.R

Ashish

5 REPLIES 5
mƎALLEm
ST Employee

Hello,

Sorry, in the title: "Ethernet on stm32f407" and in the attachment "CAN_Communication.zip". Could you please check and clarify?

Please review how to ask a question in this community to prevent any misunderstanding of your request and avoid wasting time.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hi 

I am trying configure ethernet on stm32f407and want to send data from ethernet to stm32f407 and vice versa .So can you help me with some tips or project example how can I achieve.

I have attached my project zip in which I have configured ethernet.

Note : Do I have to configure memory layout also like H7 board because someone has shared or it is not necessary default configuration will work.

 

Hello,

I’m not Ethernet expert, but Ethernet is not SPI or UART and simple as you imagine. If you are not familiar with it I suggest you to use UART or SPI or I2C or similar depending on your needs.

You need an external Ethernet PHY that you need to configure in the software and you need to take care a lot of things like the PHY timings, Clocks etc.. which I think if you are a beginner is not convenient for you.

If you insist checkout this article as it may help you: How to create a bare metal HAL Ethernet application on STM32H563/STM32H723 (No need for Ethernet stack such as LWIP).

PS: for your question about memory layout: no H7 and F4 are different families and the memory mapping is not the same. You need to take care also of that. 

Good luck with that.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@Ash1 wrote:

I am trying to understand how can I send data and receive


Do you understand the basics of Ethernet networking ?

Typically, you would use either TCP or UDP over IP - known as "TCP/IP" or "UDP/IP" for short.

To do that, you would need software known as a protocol stack; eg, LwIP:

https://savannah.nongnu.org/projects/lwip/

https://en.wikipedia.org/wiki/LwIP

 

There are also hardware devices to do this for you; eg,

https://wiznet.io/

https://www.lantronix.com/products-class/serial-to-ethernet-wired-device-servers/

 

Try "STM32F4 Ethernet" in your favourite internet search engine...

Also search the forum; eg,

How to Connect STM32F407-Discovery Board to Ethernet?

Ethernet on STM32F4 Discovery

 

Maybe look at ST boards which include Ethernet ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

As @mƎALLEm said, this is a non-trivial task.

So, if you decide to go ahead, you need to start simple:

You will need to spend some time studying how Ethernet, IP, etc works

Start by just establishing comms with a PC or some other known-good network device.

Think about what test tools you will need; eg,

WireShark

https://stackoverflow.com/questions/515328/good-tool-for-testing-socket-connections

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.