Using LwIP on the STM32H7

Robin Müller robin.mueller.m at
Fri Jan 29 11:01:41 UTC 2021

It probably adds the lwIP sources and builds them.

Right now I am trying to solve an issue with the DMA (hopefully the last
issue), because the following function used by lwIP is not working:

static err_t low_level_output(struct netif *netif, struct pbuf *p)
  uint32_t i=0, framelen = 0;
  struct pbuf *q;
  err_t errval = ERR_OK;
  ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT];

  for(q = p; q != NULL; q = q->next)
    if(i >= ETH_TX_DESC_CNT)
      return ERR_IF;

    Txbuffer[i].buffer = q->payload;
    Txbuffer[i].len = q->len;
    framelen += q->len;

      Txbuffer[i-1].next = &Txbuffer[i];

    if(q->next == NULL)
      Txbuffer[i].next = NULL;


  TxConfig.Length = framelen;
  TxConfig.TxBuffer = Txbuffer;

  HAL_StatusTypeDef ret = HAL_ETH_Transmit(&EthHandle, &TxConfig, 20);

  if(ret != HAL_OK) {
 printf("low_level_output: Could not transmit ethernet packet, code
%d!\n\r", ret);

  return errval;

The HAL_ETH_Transmit call just times out. If I set the timeout to 20 to
HAL_MAX_DELAY, the function will just block indefinitely.
Does anyone have an idea why this might happen?
Now I have also found  this
which also
explains some details about the STM32 DMA..

Kind Regards

On Fri, 29 Jan 2021 at 01:25, Chris Johns <chrisj at> wrote:

> On 29/1/21 12:35 am, Robin Müller wrote:
> > Are there any other thinks I need to take into account for making LwIP
> > work with RTEMS?
> I have not used LwIP but there is an RSB package ...
> It has a patch. I have no idea about the state of the patch or what it
> does.
> Any updates to LwIP would be welcomed back into the project.
> Thanks
> Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list