NETMF 4.2 EMX LCD Problem

NETMF4.2 / LCD configuration

I have done this without problems on the G120 with a Newhaven screen 4.3" 480 x 272.

PixelClockRateKHz = 9000

(EMX: 72 HHz / 8 = 9000)

But, trying the same with the EMX causing an exception !!!

The thread ‘’ (0x2) has exited with code 0 (0x0).
#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (1) ####
#### Message:
#### GHI.Premium.Hardware.Configuration+LCD::Set [IP: 003b] ####
#### MFW_EMX_Resp_3.Program::SetLCDConfigurations [IP: 005d] ####
#### MFW_EMX_Resp_3.Program::Main [IP: 0008] ####
A first chance exception of type ‘System.NotSupportedException’ occurred in GHI.Premium.Hardware.dll
An unhandled exception of type ‘System.NotSupportedException’ occurred in GHI.Premium.Hardware.dll

The code is:

    // Set LCD Configuration for Newhaven NHD-4.3-480272EF-ATXL#-T
    private static void SetLCDConfigurations()
    {
        Configuration.LCD.Configurations lcdConfig = new Configuration.LCD.Configurations();

        lcdConfig.Width = 480;
        lcdConfig.Height = 272;

        lcdConfig.OutputEnableIsFixed = false;
        lcdConfig.OutputEnablePolarity = true;

        lcdConfig.HorizontalSyncPolarity = false;
        lcdConfig.VerticalSyncPolarity = false;
        lcdConfig.PixelPolarity = false;

        lcdConfig.HorizontalSyncPulseWidth = 41;
        lcdConfig.HorizontalBackPorch = 2;
        lcdConfig.HorizontalFrontPorch = 2;

        lcdConfig.VerticalSyncPulseWidth = 10;
        lcdConfig.VerticalBackPorch = 2;
        lcdConfig.VerticalFrontPorch = 2;

        // NOTE: This is used for EMX
        lcdConfig.PixelClockRateKHz = 9000;

        // Set config
        if (Configuration.LCD.Set(lcdConfig))
        {
            // New settings were saved, must reboot
            Debug.Print("LCD Configuration Change. Device is rerooting.");
            Microsoft.SPOT.Hardware.PowerState.RebootDevice(false);
        }
    }

…and the best way to update your code isn’t to paste it in again, it’s to edit your existing post. Click the pencil icon (at the top of your post, on the right hand side, there’s a row of dim icons, it’s roughly in the middle), then select your block of code, then hit the 101010 button at the TOP of the post (not the orange coloured one at the bottom) and it’ll insert the tags for you. Then re-submit your post.