EMX - Video Display visual "glitch noise" during SD card writes

I’ve noticed SD card writes causing video glitching artifacts.

  • EMX running Premium library.

  • Can this be rectified?

  • Is it a know issue?

  • Can someone confirm similar results on their own hardware? (esp vga display)

We use the EMX on a custom board outputting to a VGA monitor display through resistor ladders. We also use the SD card for persistent storage. We noticed that during the SD card wites, the screen sometime gitches. The glitch can manifest itself as part of the screen jerking to the left (although it might sometimes jerk to the right?) Sometimes parts of horizontal lines of pixels will show as colours other than what is expected.

The size of the glitch seems to be related to how long the SD card writes for and so is related to how many bytes are requested to be written at a time. I found during my test that 6000 byte writes helped to produce the glitch artifacts. Although our actual app was only doing 200 to 300 byte writes when we noticed it.

To rule out anything about the app code, i wrote some test code that just displayed vertical colour bars with thin vertical black lines in between. Then included code to write 6000 bytes to the SD card over and over with 500mS interval in between. The glitches were quite pronounced on the vga monitor.

Then to test some other hardware, I tried the same test on the EMX Development System V1.3 with the TFT LCD that came with it. I just changed the video settings and the colour bar pattern to suit the display. The jerking glitch artifact is apparent with this scenario albeit not as severe.

I’ve been able to see the gitched data on the RGB data lines and the Hsync signal with an oscilloscope. Vsync is a bit difficult to see but it must be happening on Vsync for the jerk glitch to occur. I still need to do some experiments but the glitch pulse appears to have a lower impedance than one would expect from a signal if the glitch effect was caused by induced crosstalk on our pcb traces (also, the sd card lines are some 4.5cm? away from the video lines on our pcb). Even after adding a weak voltage divider on the line to test this theory, the glitched part of the data is still 3.3V which makes me suspiscious that it might actually be generated from the module that way. The SD card writes don’t seem to affect the board’s 3.3V rail.

@ Evan Khizkial - you need to lower the LCD clock a notch. You are exceeding the max internal memory bandwidth.

@ Gus - I’m not sure I understand what you are implying. If i change the LCD clock would that not affect other timing settings like refresh rate? I use the system with a VGA screen using 640x480. I got the sample code from this forum and posted the parameters below. Could you please review and recommend changes.

If 640x480 is impractical with a lower LCD clock could you please let me know parameters that will will work with the LCD that comes with the EMX dev board 1.3.

var lcd = new Configuration.LCD.Configurations
                Width = 480,
                Height = 480,
                //                                    PriorityEnable = true,
                OutputEnableIsFixed = true,
                OutputEnablePolarity = true,
                HorizontalSyncPolarity = false,
                VerticalSyncPolarity = false,
                PixelPolarity = true,
                HorizontalSyncPulseWidth = 69,
                HorizontalBackPorch = 20,
                HorizontalFrontPorch = 3,
                VerticalSyncPulseWidth = 2,
                VerticalBackPorch = 32,
                VerticalFrontPorch = 11,
                PixelClockRateKHz = 18000


What do you see at 12hmz?

At 12Mhz the monitor goes out of range and doesn’t display anything.

I’m probably calculating this wrong, but at 18Mhz, would that be a 43Hz VGA refresh rate?

On the TFT LCD display of the EMX Development System V1.3, setting to 320 x 320 and 9Mhz pixel clock works OK with no glitching artifacts during SD card writes.

Any other ideas or settings we might try to operate the VGA display at the current resolution but at a slower refresh rate?