2017-11-13 01:41 AM
Hi
basically I tried to set up LWIP and freertos on a F429ZI nucleo board. everything went fine, unless: I observed the following bug:
Bug description:
1. start FW with ethernet cable disconnected
2. wait for 10 secnds
3. plug ethernet cable
4. ping board
-> board wont reply to ping.
I also went to ST's official example projects under.
STM32Cube_FW_F4_V1.17.0\Projects\STM32F429ZI-Nucleo\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS
In this code I had to diable DHCP, but then: same problem.
Any idea what to do ?
Thx
#lwip2017-11-14 10:49 AM
If you believe that you can press a few buttons and get product ready code you are going to be very disappointed.
CubeMX spits out boilerplate code, it's only as good as the effort that went into creating it. From the forum traffic it should be evident that minimal review and regression testing has been done on this code.
Error propagation is pretty poor, error recovery is non-evident.
2017-11-15 09:01 AM
Hello
dieter.dieter
,This is not a bug, the auto-detection of the Ethernet cable is notimplemented for all boards,
In your case you need to reset the board after cable connection.
If you want you can send me your application and will implement this features for you
Best regards,
Oussema.
2017-11-15 10:41 AM
This is not a bug ,...
That would be debatable.
A real, paying customer would have specified and demanded such a thing ...
Luckily it is not difficult to implement.
2017-11-16 12:42 AM
Thanks @
HAJJEM.Oussema
>> the auto-detection of the Ethernet cable is notimplemented for all boards,
For which board is it implemented?
2017-11-16 01:18 AM
dieter 123 wrote:
>> the auto-detection of the Ethernet cable is notimplemented for all boards,
For which board is it implemented?
2017-11-16 03:05 AM
Hi,
you can create a thread to poll for the link status with the following function:
void ethernetif_set_link(void const *argument)
{
uint32_t regvalue = 0;
struct netif *netif = ( struct netif *)argument;
for(;;)
{
/* Read PHY_BSR*/
HAL_ETH_ReadPHYRegister(&EthHandle, PHY_BSR, ®value);
regvalue &= PHY_LINKED_STATUS;
/* Check whether the netif link down and the PHY link is up */
if(!netif_is_link_up(netif) && (regvalue))
{
netif_set_link_up(netif);
}
else if(netif_is_link_up(netif) && (!regvalue))
{
netif_set_link_down(netif);
}
/* Suspend thread for 200 ms */
osDelay(200);
}
}
BR,
Oussema.