I have tried to load the FEZ Portal Official demo into my FEZ Portal and when it runs I get an “An unhandled exception of type ‘System.OutOfMemoryException’ occurred in GHIElectronics.TinyCLR.Devices.Display.dll” when setting up the display controller.
I have also tried Greg Norris’s teleprompter program as it is quite concise but it also generates the same exception.
I have tried the usual erase program + firmware and reload firmware with no luck.
Running VS2022 V17.11.4 with Extension TinyCLR OS Project 2.3.0.1000
All nuget packages are 2.3.0.1000
Portal is running firmware 2.3.0.1000
Any thoughts as to where I am going wrong - minimal program below.
namespace TinyCLRApplication1
{
class Program
{
static void Main()
{
GpioPin backlight = GpioController.GetDefault().OpenPin(SC20260.GpioPin.PA15);
backlight.SetDriveMode(GpioPinDriveMode.Output);
backlight.Write(GpioPinValue.High);
var displayController = DisplayController.GetDefault();
displayController.SetConfiguration(new ParallelDisplayControllerSettings
{
Width = 480,
Height = 272,
DataFormat = DisplayDataFormat.Rgb565,
Orientation = DisplayOrientation.Degrees0, //Rotate display.
PixelClockRate = 10000000,
PixelPolarity = false,
DataEnablePolarity = false,
DataEnableIsFixed = false,
HorizontalFrontPorch = 2,
HorizontalBackPorch = 2,
HorizontalSyncPulseWidth = 41,
HorizontalSyncPolarity = false,
VerticalFrontPorch = 2,
VerticalBackPorch = 2,
VerticalSyncPulseWidth = 10,
VerticalSyncPolarity = false,
});
displayController.Enable();
}
}
}