cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ethernet bandwidth on custom board with LCD.

JLakn
Associate II

Hey,

I'm working on a custom board project .

On board i have:

  • TFT-LCD display with 800x480 resolution
  • External 16-bit SDRAM for storing two frame buffers
  • Ethernet driver LAN8742
  • MCU - STM32F767IIT

I managed to run a simple http server with source from ST. Server works pretty well until I turn on LTDC.  I tested the connection (IPERF client) with LTDC on and LTDC off. When LTDC is on I get bandwidth around 200kbit/sec. Also what I noticed is that link activity led is constantly blinking with 11.9Hz. When LTDC is off I get bandwidth around 50 Mbit/sec and the led is blinking properly as it should. My first thoughts were that MCU is overloaded. So I measured MCU load and got on average 15% of MCU load. I'm using touchgfx framework which is pretty well optimized for MCU so it uses a very small portion of processor time . Then I tried to lower the frequency for display from 26 MHZ (60HZ refresh rate) to 7MHZ (17HZ refresh rate) and I got bandwidth around 50Mbit/sec and a good working http server without freezing.  So I think I have a problem with the overused AHB bus matrix which is shared between ETHERNET DMA and LTDC (ethernet is using internal SRAM and LTDC external SDRAM).  Is there any way to test or calculate that so I can be definitely sure that the problem is with hardware design.  I'm not very familiar with ethernet so please excuse me if I'm not thinking right.

Any help would be really appreciated.

4 REPLIES 4
MM..1
Chief III

As first you write about TouchGFX, then i mean you use RTOS maybe need correct IRQ priority levels on all used interrupt. Second is question how you change on your display in realtime. Next is RAM types in STMF76X , what is used for ethernet ...

DTCM-RAM 0x2000 0000 0x2001 FFFF 128 Kbytes DTCM (64-bit)

ITCM-RAM 0x0000 0000 0x0000 3FFF 16 Kbytes ITCM (64-bit)

SRAM1 0x2002 0000 0x2007 BFFF 368 Kbytes AHB (32-bit)

JLakn
Associate II

Hey @MM..1​ ​ , sorry i forgot to mention that I'm using FreeRtos. I already tried correcting priority levels but I couldn't get it working any better.

Here is screenshot of priorities :

0693W0000059GKjQAM.pngFreeRTOS priorities:

  1. User Interface (TouchGfx) task - osPriorityNormal
  2. EthIf task - osPriorityRealtime
  3. TCP/IP task - osPriorityHigh
  4. HTTP server task - osPriorityNormal
  5. DHCP task - osPriorityBelowNormal

If I understand correctly with the display question you meant how many redraw operations are done in my user interface. For testing purposes I'm displaying only one static white background and static text Hello World. So there is basically only one operation of drawing.

For ethernet I'm using SRAM2 0x2007C000 - 0x2007FFFF 16Kbytes .

MM..1
Chief III

As first try change ethernet to DTCM ram. And RTOS when i good understand, need all other irq lower except...

Thank you for your time @MM..1​  I think i found the problem. I have disturbances around 25Mhz Crystal. I will try to replaced it with 25MHZ Oscillator which is not so sensitive to EMI as Crystal.