STMicroelectronics / x-cube-azrtos-h7

X-CUBE-AZRTOS-H7 (Azure RTOS Software Expansion for STM32Cube) provides a full integration of Microsoft Azure RTOS in the STM32Cube environment for the STM32H7 series of microcontrollers.
https://www.st.com/en/embedded-software/x-cube-azrtos-h7.html
Other
149 stars 56 forks source link

Nx_TCP_Echo_Client on Nucleo-H753ZI: ETH not working #13

Closed hmckinlay closed 2 years ago

hmckinlay commented 2 years ago

Has anyone got this working?

The code for me is hanging out in tx_semaphore_get waiting forever.

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

Examples Followed: STM32CubeH7 Projects\STM32H743ZI-Nucleo\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS x-cube-azrtos-h7 https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects/STM32H747I-DISCO/Applications https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects/NUCLEO-H723ZG/Applications/NetXDuo

Hardware: -Nucleo-H753ZI Nucleo Board -SB26 removed to allow for SWO and confirmed working

Development Environment: -STM32CubeIDE

STM32CubeMXConfiguration: image -Ethernet global interrupt enabled image -ThreadX configuration the default -NetXDuo configuration the default except NX_ENABLE_INTERFACE_CAPABILITY enabled -Cache & MPU Disabled

Software: -Linker code added after HEAP ` .tcp_sec (NOLOAD) : { _stcps = .; / define a global symbol at start /
. = ABSOLUTE(0x30000000); (.RxDecripSection) . = ABSOLUTE(0x30000060); (.TxDecripSection) _etcps = .; / define a global symbol at end / } >RAM_D2 AT >FLASH

.nx_data 0x30000100 (NOLOAD) : { _snxd = .; / define a global symbol at start / (.NetXPoolSection) (.ThreadXPoolSection) _enxd = .; / define a global symbol at end / } >RAM_D2 AT >FLASH` -Memory pool allocations all succeed -app_azure_rtos.c, app_threadx.c, app_netxduo.c, are the same as the example -I found I had to put tx_byte_pool_buffer into D2 RAM or i got hardfaults, not sure why =(.

ALABSTM commented 2 years ago

Hi @hmckinlay,

Thank you for this detailed report. Would you mind sharing your IOC file? This would help us better analyze the point.

With regards,

hmckinlay commented 2 years ago

Hi @ALABSTM,

Thanks for the hasty reply.

I have uploaded the entire project to: https://github.com/hmckinlay/Nx_TCP_Echo_Client-on-Nucleo-H753ZI

Specifically the ioc file: https://github.com/hmckinlay/Nx_TCP_Echo_Client-on-Nucleo-H753ZI/blob/master/p1/p1.ioc

Note the MCU and Cache are enabled in CubeMX but disabled via #defines.

The dev environment was installed a couple of weeks ago on Windows 10 and afaik everything is the latest version:

Cheers, Hamish.

hmckinlay commented 2 years ago

Sorry if i wasted anyones time, the ETH pins were set wrong on CubeMX. After fixing that it all works fine.

Note: The MPU must be enabled for this to work too, otherwise you get hardfaults.

I'll update the GIT repo above, might help others. Thanks.