Skip to main content
Explorer
March 27, 2025
Question

AzureRTOS Nx_TCP_Echo_Server on NUCLEO-H743ZI2

  • March 27, 2025
  • 3 replies
  • 2406 views

Hello everyone,

I use the NUCLEO-H743ZI2 board in my project and previously, Before I've used the MBed OS - it works well on this board, just I need to maximize TCP transfer speed as well as QSPI. So I decided to try another RTOS. After reading forums, I decided to try the Azure RTOS and Cube IDE. I chose the Nx_TCP_Echo_Echo_Server example as a starting point. I reconfigured it to use with NUCLEO-H743ZI2, and also I disabled DHCP as I don't need it. Also added plenty of printf functions at different steps in the app_netxduo.c. As result project can be build, and I see next messages in Terminal:

The network cable is connected.
nx_ip_interface_status_check == NX_SUCCESS.
nx_ip_address_set == NX_SUCCESS.
nx_tcp_socket_create == NX_SUCCESS .
nx_tcp_server_socket_listen == NX_SUCCESS .
TCP Server listening on PORT 5000
STM32 NX_APP_DEFAULT_IP_ADDRESS: 192.168.0.200
Next is the tx_semaphore_get

Then I try to ping the board I see the blinking LED on the Ethernet connector of the board but I get :

Ping statistics for 192.168.0.200:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Thus, it looks like the function

static VOID tcp_listen_callback(NX_TCP_SOCKET *socket_ptr, UINT port)
{
tx_semaphore_put(&TCPSemaphore);
}

never called.

I already spent two days trying to find solutions. All receipts which I found - like
https://community.st.com/t5/stm32-mcus/ethernet-not-working-on-stm32h7x3/ta-p/49479
I implemented them - the result is the same.


Does anyone have any idea where is the problem?
Thanks in advance.

 

    This topic has been closed for replies.

    3 replies

    Graduate
    March 27, 2025

    You must add some more info to get valuable feedback like if you are running some demo or 100% your code.

    In case you are NetXDuo primitive, try look at stats embedded in NX_IP structure.

    You can get an idea if ethernet is working properly.

    IrekAuthor
    Explorer
    March 27, 2025

    Thank you for reply!
    As I am a newcomer here, could you please explain what should I upload? The whole project now is 160Mb and in ZIP it is 50 Mb - probably this is too large?
    Thank you in advance!

    IrekAuthor
    Explorer
    March 31, 2025

    I have changed pins for the Ethernet adapter in the Nx_TCP_Server project according to schematic.

    Ether.png

    Result is absolutely amazing - now program freezes in the static void MX_USART3_UART_Init(void) at the line if (HAL_UART_Init(&huart3) != HAL_OK)
    It is a real magic! How changing pins for Ethernet can influence the USART3 ? Pins are completely different...

    Graduate
    March 31, 2025

    It is not only gpio pins - compare my and your ioc files to see what else is wrong

    Uart is the problem I found earlier, with 2 project nested

    IrekAuthor
    Explorer
    March 31, 2025

    Ok, I assume you have a correct ioc file. 
    But when I open your ioc file in Cube IDE I see plenty of colours as many of the features are disabled or have warnings. E.g. I use QSPI in my hardware - and it is disabled in your configuration. 
    And it really looks like a black magic!

    For example: in your ioc : Mcu.Pin59=PG11,

    in CubeIDE's ioc :             Mcu.Pin18=PG11

    And in the MB1364 schematic I see that PG11 corresponds to the pin 126 (!)

    So I don't understand in which god I should trust ! ;) But Ok - this is a secondary problem for now.

     

    Could you please help me to get a working Nx_TCP_Echo_Server example with static IP address on the NUCLEO-H743ZI2 board? 
    Or related question. If I switch to the FreeRTOS-Plus-TCP in the Cube IDE will I have difficulties with ioc file too?
    Just in MBed Studio everything worked well without such problems...

     

     

    IrekAuthor
    Explorer
    April 1, 2025

    Good morning!
    I succeed to compile and run the LwIP_HTTP_Server_Netconn_RTOS example on my NUCLEO-H743ZI2 board.
    And I succeed to run it with static IP and not DHCP. But this example use LWIP as MBed - so not very fast and not very stable.

    Can someone suggest working non-LWIP library for NUCLEO-H743ZI2 board?

    Graduate
    April 1, 2025

    NetxDuo is best available - I agree LwIP is not reliable - but also NetxDuo has some limitations, be careful and test your specs till last bit before committing to it.

    TCP seerver are embedded in HTTP, FTP, and other servers, not availbale as standalone.

    You need to dig in heavvy nested code, unless you have great skill, you will run in trouble.

    We did a lot of reverse engineering to get websockets on top of http, but never had requests for pure TCP.

    I suggest to have a look at available protocols, I know some are happy with MQTT which is in NetXDuo.

    I never used it.

    I was for a long time Xilinx developer and IP provider, I love Fpga+Dsp+Mpu solutions.

    Another solution, could be to build a QUIC protocol on top of UDP, UDP is in NetXDuo