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();
- 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();
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 MPU ETHADDR16_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.