cancel
Showing results for 
Search instead for 
Did you mean: 

Possible problem with ethernetif.c

Keith Smith
Associate
Posted on April 26, 2017 at 20:24

In the file ethernetif.c supplied as part of cubemx based BSP, there is a static function low_level_output(). In this function is a call to HAL_ETH_TransmitFrame().

The return code of HAL_ETH_TransmitFrame() is not checked. It returns one of the three codes, 0=OK, 1=Error, and 2=HAL_BUSY. The HAL_BUSY code is return via the macro __HAL_LOCK

If HAL_BUSY is returned, there is no 'retry' and no way to report the 'failure'.

This can cause a disruption in TCP/IP communication, should __HAL_LOCK return busy.

#bsp #tcp/ip-stack #cubemx
0 REPLIES 0