cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7x3 - Ethernet Desc Allocation in D2 SRAM

Manish Sharma
Associate III
Posted on April 17, 2018 at 13:13

Hi All,

I am working on Ethernet in STM32H7 and I am unable to understand two things :

1) What is the need to avoid memory allocation of ETH_Tx and ETH_Rx Desc  in D1 SRAM ?

I have seen an example in 'STM32Cube/Repository/STM32Cube_FW_H7_V1.2.0/ Projects/STM32H743I_EVAL/Applications/LwIP/LwIP_TFTP_Server' where they have allocated memory of ETH_TX and ETH_RX Desc in D2 SRAM3 (Address: 0x30040000) so why cannot i choose

* D2 SRAM1( Address: 0x3000000) or

* D2 SRAM2 ( Address: 0x30020000) or

* D3 SRAM ( Address: 0x3800000) ?

2 ) Also, I have seen in the repository example that they have used MPU_Config() but its not too much clear as i have seen a related doc which is again quite hard to understand so kindly put  'enough' light so that we can understand the significance and use case of it in this example.

Sincerely,

Manish

#stm32cubemx-ethernet
3 REPLIES 3
AvaTar
Lead
Posted on April 17, 2018 at 13:29

1) What is the need to avoid memory allocation of ETH_Tx and ETH_Rx Desc  in D1 SRAM ?

I strongly suspect this RAM area is not DMA-capable, or 'TCM' in ST's jargon.

Consult the datasheet/reference manual of the H7 device.

Posted on April 17, 2018 at 14:03

There is an interconnect path that goes from [ ETHERNET MAC]  to [ AXI RAM ] so don't think a reason to suspect.

Joerg Wagner
Senior III

@Nickname194 : TCM is a different domain and not connected to DMA controllers in H7x3 architecture while any SRAM is usable.

@Manish : You can use different SRAM (for some you have to turn on the clock)

Memory is more scattered in H7x3 than in F767 i.e. and one reason to choose SRAM3 is the size of this block. Basically SRAM3 is occupied for ETH only and this is simple to set up in the linker script.

I don't want to fragment D1 or SRAM1.