I’ve updated my Cobra II to 4.2.11 and have an older CP7. When I let the system library set the LCD PixelClockRateKHz it is 40K, but I’ve determined that 25K is what my display works best with (the screen is unreadable at 40K). If I set the LCD configuration to 25K when the app is ran and then reboot, I get caught in a loop because the system wants to configure the rate to 40K and I need to have 25K. What can I do to prevent the system from automatically defaulting to 40K? Is there a way to disable the auto-detect of the display type?
The most recent SDK should be setting the clock to 24KHz. If you want to change that number though and have your device not update it, add the CP7 driver to your project and change the pixel divider on line 247 to an integer that will get you to the clock you want. 120,000 / PixelClock = PixelDivider.
Ok, I’ve changed my code to this and it still goes into an endless loop of rebooting:
display_CP7 = new GTM.GHIElectronics.Display_CP7( 3, 2, 1, 4 );
Gadgeteer.Mainboard.LCDConfiguration lcdConfig = new GT.Mainboard.LCDConfiguration();
lcdConfig.Width = 800;
lcdConfig.Height = 480;
lcdConfig.OutputEnableIsFixed = true;
lcdConfig.OutputEnablePolarity = true;
lcdConfig.HorizontalSyncPolarity = true;
lcdConfig.VerticalSyncPolarity = true;
lcdConfig.PixelPolarity = false;
lcdConfig.HorizontalSyncPulseWidth = 1;
lcdConfig.HorizontalBackPorch = 46;
lcdConfig.HorizontalFrontPorch = 16;
lcdConfig.VerticalSyncPulseWidth = 1;
lcdConfig.VerticalBackPorch = 23;
lcdConfig.VerticalFrontPorch = 7;
lcdConfig.PixelClockDivider = 5;
Program.Mainboard.SetLCDConfiguration( lcdConfig );
Sorry, I forgot to post a link to this document: https://www.ghielectronics.com/docs/122/gadgeteer-driver-modification You need to override the built in the driver and actually change that driver for the change to take effect.