2024-09-06 03:46 AM
Hi,
i am developing an embedded software based on the TCP Client example for CubeMX. During tests with large number of packets I have got an hard fault error. It seems that it happens on a re-transmit. The hard fault can be easy reproduced with original code. For this the right IP address must be set. Also the packet count should be increased to have time to remove the LAN cable while running.
The Project was setup like this:
My only modification:
#define TCP_SERVER_ADDRESS IP_ADDRESS(192, 168, 0, 213)
#define MAX_PACKET_COUNT 10000
Here a screenshot:
It seems that a pointer gets damaged as the address 0xF338000 makes no sense.
Best regards,
Roman Thiel
Solved! Go to Solution.
2024-12-04 06:57 AM
Hi Adam,
do you have more details of your application? What is your base?
Adding NX_PACKET_HEADER_PAD and NX_PACKET_HEADER_PAD_SIZE=4 to the pre-processor should not change the functionality. Something must be strange at your code.
You can also try to add more padding e.g. NX_PACKET_HEADER_PAD_SIZE=16 but 4 should be OK.
Regards,
Roman