Now I am using STM32H723 to run freertos-plus-tcp, and get the result as follow, I don’t understand why it occurs-===-, I don’t use MPU and do not enable I/D cache too.
FreeRTOS_IPInit
FreeRTOS_AddEndPoint: MAC: 00-00 IPv4: c0a8326cip
prvIPTask started
PHY ID 7C0F0
xPhyReset: phyBMCR_RESET [0] ready
+TCP: advertise: 01E1 config 3100
Autonego ready: 00000004: full duplex 100 mbit high status
eNetworkUp
IP Address: 192.168.50.108
Subnet Mask: 255.255.255.0
Gateway Address: 192.168.50.1
DNS Server Address: 192.168.50.1
FreeRTOS_connect: 9999 to c0a8320cip:9000
Socket 9999 -> [192.168.50.12]:9000 State eCLOSED->eCONNECT_SYN
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 1: 500 ms
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 2: 500 ms
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 3: 500 ms
Connect: giving up c0a8320cip:9000
Move from eCONNECT_SYN to eCLOSE_WAIT
vTCPStateChange: Closing (Queued 0, Accept 0 Reuse 0)
vTCPStateChange: me 24004708 parent 24004708 peer 00000000 clear 0
vTCPStateChange: xHasCleared = 0
Socket 9999 -> [192.168.50.12]:9000 State eCONNECT_SYN->eCLOSE_WAIT
FreeRTOS_connect() stopped due to an error
FreeRTOS_connect: 9999 to c0a8320cip:9000
Socket 9999 -> [192.168.50.12]:9000 State eCLOSE_WAIT->eCONNECT_SYN
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 1: 500 ms
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 2: 500 ms
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 3: 500 ms
Connect: giving up c0a8320cip:9000
Move from eCONNECT_SYN to eCLOSE_WAIT
vTCPStateChange: Closing (Queued 0, Accept 0 Reuse 0)
vTCPStateChange: me 24004708 parent 24004708 peer 00000000 clear 0
vTCPStateChange: xHasCleared = 0
Socket 9999 -> [192.168.50.12]:9000 State eCONNECT_SYN->eCLOSE_WAIT
FreeRTOS_connect() stopped due to an error
FreeRTOS_connect: 9999 to c0a8320cip:9000
Socket 9999 -> [192.168.50.12]:9000 State eCLOSE_WAIT->eCONNECT_SYN
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 1: 500 ms
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 2: 500 ms
ARP c0a8320cip miss using c0a8320cip
ARP for c0a8320cip (using c0a8320cip): rc=0 00-00-00-00-00-00
Connect[c0a8320cip:9000]: next timeout 3: 500 ms
Connect: giving up c0a8320cip:9000
Move from eCONNECT_SYN to eCLOSE_WAIT
vTCPStateChange: Closing (Queued 0, Accept 0 Reuse 0)
vTCPStateChange: me 24004708 parent 24004708 peer 00000000 clear 0
vTCPStateChange: xHasCleared = 0
Socket 9999 -> [192.168.50.12]:9000 State eCONNECT_SYN->eCLOSE_WAIT
FreeRTOS_connect() stopped due to an error
From the logs, it seems like your device is not able to get a SYN_ACK packet from the server even after 3 attempts at sending SYN packets:
if( pxSocket->u.xTCP.ucRepCount >= 3U )
{
/* The connection is in the SYN status. The packet will be repeated
* to most 3 times. When there is no response, the socket get the
* status 'eCLOSE_WAIT'. */
FreeRTOS_debug_printf( ( "Connect: giving up %xip:%u\n",
( unsigned ) pxSocket->u.xTCP.xRemoteIP.ulIP_IPv4, /* IP address of remote machine. */
pxSocket->u.xTCP.usRemotePort ) ); /* Port on remote machine. */
vTCPStateChange( pxSocket, eCLOSE_WAIT );
}
After the 3 tries, it stops and sets the state to eCLOSE_WAIT.
Are you sure your server is working fine and is reachable? Maybe you try connecting to it with netcat or a small Python script to make sure the server is fine.
Did you make sure your device’s network interface is up? Is it responding to pings?
Maybe enable ipconfigUSE_DHCP and see if your device is able to get the IP assigned.
Yes I can not ping my device at all. It seems that network interface doesn’t work up.
But the same config it can work up on STM32F470VGT6. So I don’t unstand that why it can’t work on STM32H723