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.

Home Page:https://www.st.com/en/embedded-software/x-cube-azrtos-h7.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nx_TCP_Echo_Client on Nucleo-H753ZI: ETH not working

hmckinlay opened this issue · comments

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 =(.

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,

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:

  • STM32CubeIDE Version: 1.7.0 Build: 10852_20210715_0634 (UTC)
  • STM32CubeMX Version: 6.3.0-RC5 Build: 20210714-1111 (UTC)
  • X-CUBE-AZRTOS-H7 v2.0.0

Cheers,
Hamish.

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.