Content originally posted in LPCWare by wellsk on Thu Aug 16 07:07:13 MST 2012
LCD refresh from SDRAM and memmove to SRAM both use the same external memory bus.
If your memmove operation takes too long, the LCD refresh cycle will be delayed too long and the LCD will appear to glitch. Depending on your LCD pixel clock rate and color depth, the LCD must get data at a minimum rate. Longer operations on the external memory bus like long stack push/pop sequences, memmove/memcpy functions (which use LDM/STM burst), or extended operations to a slower memory peripheral can stall the LCD refrsh long enough for this to happen.
It sounds like your SRAM is slower than SDRAM if the memmove works ok with SDRAM. Instead of moving data to SRAM via a memmove/memcpy function, try moving the data via a simple for-loop to see if the issue goes away. memmove/memcpy are typically optimized to use LDM/STM burst with sizes of 16 bytes of more, so the external memory controller will be unavailable to the LCD controller for that SRAM burst.