Skip to main content
Lokesh1
Associate II
August 18, 2023
Solved

STM32H757 Ethernet communication not working

  • August 18, 2023
  • 2 replies
  • 2694 views

Hello ST Team
I am working on medical project involving patient monitoring
Currently we are using the STM32H757XI-EVAL board and trying communicate the host monitor via ethernet TCP/UDP. The underlying operating system is Azure RTOS.I am not able to find the sample with the needed combination.
I tried using the XcubeRTOSH7 repo
and making adaptation based on it, but the end result is not successful.

Kindly provide any working sample or direct towards the appropriate adaptation that are needed for the combination to work.

Repo: ( https://www.st.com/en/embedded-software/x-cube-azrtos-h7.html)

This topic has been closed for replies.
Best answer by Lokesh1

Hello All,

The problem is fixed now with help of an ST expert, I was able to send the data from client (STM32h757 Eval kit) to Server(PC)

The 3 main steps missed are:

1. MPU configuration in STM32Cube IDE.(Region 0 default configuration to prevent the speculative , Region 1 telling cache should not be used to have coherence between ethernet and core)

Lokesh1_1-1694164350379.png

Lokesh1_0-1694164664447.png

 

2. Linker script update.(To update DMA descriptors at proper memory location)

Lokesh1_2-1694164443648.png

3. Ethernet Interrupt enable.

Lokesh1_3-1694164494692.png

After fixing this I am facing some faults like Memanagefault and Hardfault, just after data transmission. Debug in progress.

2 replies

Technical Moderator
August 18, 2023

Hello @Lokesh1 ,

Are you using MII mode as ethernet interface or RMII interface?

If possible, please share you project, in order that Community users can help you solve your issue.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Lokesh1
Lokesh1Author
Associate II
August 22, 2023

Hello @Imen.D 

I am using RMII interface supported by STM32H757XI-EVAL board, please find the attached code base for more details.

Lokesh1
Lokesh1AuthorBest answer
Associate II
September 8, 2023

Hello All,

The problem is fixed now with help of an ST expert, I was able to send the data from client (STM32h757 Eval kit) to Server(PC)

The 3 main steps missed are:

1. MPU configuration in STM32Cube IDE.(Region 0 default configuration to prevent the speculative , Region 1 telling cache should not be used to have coherence between ethernet and core)

Lokesh1_1-1694164350379.png

Lokesh1_0-1694164664447.png

 

2. Linker script update.(To update DMA descriptors at proper memory location)

Lokesh1_2-1694164443648.png

3. Ethernet Interrupt enable.

Lokesh1_3-1694164494692.png

After fixing this I am facing some faults like Memanagefault and Hardfault, just after data transmission. Debug in progress.

Lokesh1
Lokesh1Author
Associate II
September 12, 2023

In order fix the hardfault issue, you also need to make the following configuration changes compared to above solution.

The hardfault issue is raised because the nx pool buffer and we need this buffer allocated with memory in non-cachable area to store ethernet data, hence we need to make the following changes to reach 100% data transfer and fault free code.

MPU Configuration: (Previously we allotted only 1KB for descriptors now we increased the size to 32KB because 30KB is requested by NetxPool)

Lokesh1_0-1694538385053.png

Linker Script:

Lokesh1_1-1694538431688.png