2024-05-14 04:46 AM
Solved! Go to Solution.
2024-05-22 04:35 PM
Hi @CharterWim
I'm just starting to learn ThreadX + NetXDuo, so I may have made a mistake that I'm still not aware of.
However, it seems I managed to run the Nx_UDP_Echo_Server without the debugger connected to my NUCLEO-H563ZI.
What I did was:
1. Disabled DHCP client exactly as you did.
2. When creating the UDP thread, I still used the TX_DONT_START so it will not run until asked to.
3. I changed the code in App_Link_Thread_Entry (app_netxduo.c) that verifies whether the cable is connected. Basically, I am calling nx_ip_driver_direct_command independent of the status returned by nx_ip_interface_status_check. I'm also using tx_thread_resume(&AppUDPThread) and tx_thread_suspend(&AppUDPThread) when the link is on or off. See my file attached. Seems to work.
Please let me know if I made any mistake, or if this works for you also!
BR
Fabio
2024-05-14 11:04 AM
Hello @CharterWim ,
if you are regenerating with cubeMX and disabling DHCP addons it should compile and the includes should eliminated automatically.
You will find attached the file app_netxduo.c used to implement UDP Server with static IP.
BR
2024-05-15 01:03 AM
Hi @STea,
Thank you for your swift response.
The "nxd_dhcp_client.h" include is not removed automatically by CubeMx when disabeling the DHCP client.
I think this is because it is inside a USER CODE section in the demo application code.
But this is not a big problem for me. I just wanted to be very detailed in describing what I did- and didn't do.
Unfortunately your app_netxduo.c yields the same results as my code.
It works when the debugger is attached.
It doesn't work when running without a debugger attached.
Yesterday I tried the same demo application from an older version of the MCU package, STM32Cube_FW_H5_V1.1.1 instead of STM32Cube_FW_H5_V1.2.0.
In the older package, the demo app does work with a static IP address without the debugger attached.
I got the idea after reading this thread about a problem simular to the one I'm facing.
There appears to be something wrong with the STM32Cube_FW_H5_V1.2.0 package I think.
Unfortunately it is hard to use STM32Cube_FW_H5_V1.1.1 with CubeMX.
Even after I removed the STM32Cube_FW_H5_V1.2.0 package, it does not want to generate code with version V1.1.1.
It keeps downloading V1.2.0
Is there a way to work around this?
Or (better even) do you have an ETA on when the problem in the MCU package will be solved? (Internal ticket number: 179408)
Regards, Wim!
2024-05-15 10:02 AM
Hello @CharterWim ,
the ticket is still in progress indeed your problem is related to the same issue. you will get some updates soon as our experts are analyzing the root cause.
BR
2024-05-22 04:35 PM
Hi @CharterWim
I'm just starting to learn ThreadX + NetXDuo, so I may have made a mistake that I'm still not aware of.
However, it seems I managed to run the Nx_UDP_Echo_Server without the debugger connected to my NUCLEO-H563ZI.
What I did was:
1. Disabled DHCP client exactly as you did.
2. When creating the UDP thread, I still used the TX_DONT_START so it will not run until asked to.
3. I changed the code in App_Link_Thread_Entry (app_netxduo.c) that verifies whether the cable is connected. Basically, I am calling nx_ip_driver_direct_command independent of the status returned by nx_ip_interface_status_check. I'm also using tx_thread_resume(&AppUDPThread) and tx_thread_suspend(&AppUDPThread) when the link is on or off. See my file attached. Seems to work.
Please let me know if I made any mistake, or if this works for you also!
BR
Fabio
2024-05-23 04:03 AM