Skip to main content
Keith Smith
Visitor II
April 26, 2017
Question

Possible problem with ethernetif.c

  • April 26, 2017
  • 0 replies
  • 439 views
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
This topic has been closed for replies.