ETH RAM region gone?

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

rubenswerk
Posts: 104
Joined: Wed Feb 22, 2012 11:39 am
Location: Austria

ETH RAM region gone?

Postby rubenswerk » Fri Jun 28, 2019 4:23 pm

Hello,

in my several years old ChibiOS application (STM32F407), there was eth_ram region in the linker script. A 16k block located at 0x2001c000. According to the map file, this block was exclusively used by mac_lld.o, and nearly all of the 16kB were used.

In actual ChibiOS linker script, this region is called ram2. However, all data seems to be located in ram0, which is the sum of ram1+ram2 (contiguous blocks).

Everything works fine, I just wonder why there was a special eth_ram section in the past? Is it a special hardware-accelerated region with optimized connection to MAC peripheral? Do we loose network performance when not using this region any more? Or is it just regular SRAM? The manual says that the STM32 has 2kB RX and TX FIFOs, but I guess those are inside the peripheral and not part of any linker section.

Thanks for explanation!
Rubenswerk

User avatar
Giovanni
Site Admin
Posts: 14461
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1077 times
Been thanked: 922 times
Contact:

Re: ETH RAM region gone?

Postby Giovanni » Fri Jun 28, 2019 5:27 pm

Hi,

It is about how SRAM appears on the bus matrix, it is better to have ETH buffers to be in a separate SRAM slave, that optimizes the internal bandwidth usage, look at the matrix diagram in the F7 RM.

Giovanni

rubenswerk
Posts: 104
Joined: Wed Feb 22, 2012 11:39 am
Location: Austria

Re: ETH RAM region gone?

Postby rubenswerk » Fri Jun 28, 2019 9:28 pm

I checked the RM and tried to understand the matrix picture, well I think at least I understood a part of it :-)
Looks like we can avoid concurrent memory access when using this 16kB SRAM2 for MAC buffers.

I added the following section to project specific linker script:

Code: Select all

    .eth :
    {
        PROVIDE(_eth_start = .);
        . = ALIGN(4);
        *(.bss.__eth_rb)
        . = ALIGN(4);
        *(.bss.__eth_tb)
        . = ALIGN(4);
        *(.bss.__eth_rd)
        . = ALIGN(4);
        *(.bss.__eth_td)
        . = ALIGN(4);
        PROVIDE(_eth_end = .);
    } > ram2


For the rest of the data you have to use ram1 instad of combined ram0 of course.

Thanks.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 11 guests