cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F756 Ethernet needs DTCM

zabel
Associate III
Posted on November 22, 2017 at 12:57

Hi,

I have problems with ethernet (using the HAL library 1.8.0) on the STM32F756ZG.

If I place the DMA buffers in the DTCM (0x20000000-0x2000ffff), it works fine. If I place the DMA buffer anywhere else (SRAM1, SRAM2), I get only on every second ping an answer (50% loss).

I don't use the MPU and I don't activate the data cache (SCB.CCR.DC = 0).

I also tried (despite the dcache being deactivated) flushing the data cache (SCB_DCacheClean()) before sending data in low_level_output() and invalidating the data cache (SCB_DCacheInvalidate()) before reading data in low_level_input(), but to no avail.

Does anybody has an idea?

TIA,

  diz

3 REPLIES 3
zabel
Associate III
Posted on November 22, 2017 at 13:01

Oops, misspelled the cache control calls, meant SCB_InvalideatDCache() and SCB_CleanDCache().

zabel
Associate III
Posted on November 30, 2017 at 10:23

Really no one has an idea? Will move on to STM32F765 due to other reason anyway -- will be interesting to see if the same occurs on this MCU.

zabel
Associate III
Posted on December 04, 2017 at 16:22

My problem was solved by

https://community.st.com/0D50X00009XkgffSAB

, i.e. I added __DSB() to HAL_ETH_TransmitFrame() as suggested by daniel nielsson.

After changing to STM32F765 that fix no longer seems to be necessary.

STM32F765 is r1p0, STM32F756 is r0p1