2017-10-08 06:11 AM
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(ðhdr->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.Solved! Go to Solution.
2018-12-24 08:01 AM
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.
2018-12-24 01:02 PM
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.
2019-01-03 01:09 AM
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.
2019-04-01 02:34 AM
Yes it is working will
Could you tell why cubmx generation code not working ?
2019-07-10 12:56 AM
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.
2019-07-13 07:39 AM
Hi.
I don't know how to help you. Do you use MPU_Config() and/or D-Cache ?
2019-07-14 10:47 PM