cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H743ZI (STM32H743ZI) no Ethernet DMA transfer

Joerg Wagner
Senior III
Posted on October 08, 2017 at 15:11

Hi all.

Does anyone have a working example for Ethernet?

I tried to build one wih CubeMX (HAL 1.1.0) with and without FreeRTOS.

I did it many times for F746, F767 (A and Z) and F769 (A) but Ethernet with STM32H743ZI (Ver. Y) will not work.

- IDE is OpenSTM32 (GNU C)

- RAM is AXI SRAM in Domain D1 or AHB SRAM1 in Domain D2

- no DTCM RAM is used (in linker script: i.e. RAM_D1 >AT FLASH, _estack is adapted)

- Instruction Cache enabled and Data Cache is disabled

- no MPU

- ethernetif.c line 421 is commented out: // SCB_CleanInvalidateDCache();

- ethernetif.c line 443 is commented out: // SCB_CleanInvalidateDCache();

Another options:

- using 0x30040000 and MPU for DMARxDscrTab[ETH_RX_DESC_CNT] and DMATxDscrTab[ETH_TX_DESC_CNT]

- DHCP or static IP

- Data cache enabled and using original SCB_CleanIvalidDCache();

The result:

stm32h7xx_hal_eth.c : HAL_ETH_Transmit(...) throws a timeout in line 708 and returns HAL_ERROR

which is not recognized by low_level_output() in ethernetif.c

Using a different timeout value (>0) in the HAL_ETH_Transmit( &heth, &TxConfig, myTimeOutVal) throws a timeout as well.

When I enable MPUETHADDR16_COPY(&ethhdr->src, src); in ethernet.c it will end in Infinite_Loop. (Edited: wrong MPU settings)

Using AHB SRAM2 in Domain D2, the software cannot be debugged. I hope not to forget something: payload is in domain D2, LAN8742 is activated in CubeMX (Platform settings), ...

In conclusion: The DMA transfer does not work.

I spent so many hours to find a solution and I'm thankful for any advice.

Note: this post was migrated and contained many threaded conversations, some content may be missing.
36 REPLIES 36

Hello @edwin8​ ,

Could you please take the time to create a new thread where you describe your problem?

Seeing that there are several customers facing issues with Ethernet on STM32H7, we would like to manage each case separately with a special focus in a dedicated action.

Thanks,

Amel

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.

Joerg Wagner
Senior III

This thread is very old. In the meantime two new firmware versions came out

and a FAQ is available:

https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3

Follow these steps and everything works properly.

MX_Master
Associate II

Hi, I made a new example project using STM32Cube_FW_H7_V1.3.0. You can find it here

https://github.com/MX-Master/STM32H7_Nucleo-H743ZI_Ethernet_LwIP

This project uses LwIP stack without RTOS. There is a HTTPD (web server) example too.

Configuration info can be found in the README.

Yes it is working will ​

Could you tell why cubmx generation code not working ?

HI Joerg,

I am also facing the same situation with stm32H750B-DK discovery board. The code exactly stops at the location you mentioned. Did you find any solution for the issue you faced long back.

I converted existing example LWIP ....\STM32Cube_FW_H7_V1.4.0\Projects\STM32H743I-EVAL\Applications\LwIP\LwIP_HTTP_Server_Raw to this board with some modification in linker file and replaced relevent library files. I also attached linker file, please check it out. The board is not able to get IP address from the router. I have complete Atollic Project, If you need I can send you also.

Please help me to resolve this issue.

Joerg Wagner
Senior III

Hi.

I don't know how to help you. Do you use MPU_Config() and/or D-Cache ?

HI,

I used MPU_Config() and also enable D-cache. I attached the MPU_config() file.... I even tried with RTos using the example LwIP_HTTP_Server_Netconn_RTOS. Problem is same thing the ethernet is not receiving any data. Please help me out if any one worked on STM32H750B-DK board.