AnsweredAssumed Answered

Possible problem with ethernetif.c

Question asked by Smith.Keith on Apr 26, 2017

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.

Outcomes