Using LwIP on the STM32H7

Robin Müller robin.mueller.m at gmail.com
Thu Jan 28 16:15:52 UTC 2021


Alright, I think these descriptors were not initialized inside the
functions:
ETH_DMATxDescListInit
ETH_DMARxDescListInit

because they are wrapped in preprocessor guards:

static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
{
#ifndef __rtems__
  ETH_DMADescTypeDef *dmatxdesc;
  uint32_t i;

  /* Fill each DMATxDesc descriptor with the right values */
  for(i=0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
  {
    dmatxdesc = heth->Init.TxDesc + i;

    WRITE_REG(dmatxdesc->DESC0, 0x0);
    WRITE_REG(dmatxdesc->DESC1, 0x0);
    WRITE_REG(dmatxdesc->DESC2, 0x0);
    WRITE_REG(dmatxdesc->DESC3, 0x0);

    WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc);
  }

  heth->TxDescList.CurTxDesc = 0;

  /* Set Transmit Descriptor Ring Length */
  WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT -1));

  /* Set Transmit Descriptor List Address */
  WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc);

  /* Set Transmit Descriptor Tail pointer */
  WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc);
#endif /* __rtems__ */
}

Is there a specific reason the function was excluded?

Kind Regards
Robin

On Thu, 28 Jan 2021 at 16:47, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 28/01/2021 16:45, Robin Müller wrote:
>
> >  *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bsp_nocache*)))
> >  .bsp_nocache   0x0000000030000000     0x18c0
> > CMakeFiles/fsfw_example.dir/bsp_stm32_rtems/boardconfig/ethernetif.c.obj
> >                 0x0000000030000000                DMARxDscrTab
> >                 0x0000000030000060                DMATxDscrTab
> >                 0x00000000300000c0                Rx_Buff
> >                 0x00000000300018c0  bsp_section_nocache_end = .
> >                 0x00000000000018c0  bsp_section_nocache_size =
> > (bsp_section_nocache_end - bsp_section_nocache_begin)
> >
> > But in the debugger, the descriptor entries are still zeroed out
> > unfortunately..
> If you place them in BSP_NOCACHENOLOAD_SECTION or
> BSP_NOCACHENOLOAD_SUBSECTION(), they are not loaded (zero initialized).
>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20210128/edbe829e/attachment.html>


More information about the users mailing list