2020-10-24 02:58 AM
Hey,
I'm working on a custom board project .
On board i have:
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.
2020-10-25 09:18 AM
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)
2020-10-25 11:36 PM
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 :
FreeRTOS priorities:
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 .
2020-10-26 07:55 AM
As first try change ethernet to DTCM ram. And RTOS when i good understand, need all other irq lower except...
2020-10-28 01:32 AM
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.