NUCLEO-H743ZI (STM32H743ZI) no Ethernet DMA transfer
- October 8, 2017
- 14 replies
- 8250 views
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.