Main Site Documentation

In-Field Update .NET micro framework


#1

Hey!

I’m using the In-Field-Update code form your website for my Cobra II and after some changes everything works fine. But I have two questions:

  1. It takes a very long time to create an application development for my update with MFDeploy. Is it possible to create an .hex file for the In-Field-Update with Microsoft Visual Studio?

  2. After updating the system reboot with the new Software, but the display isn’t calibrated. So I used the Reset Display Code:


static void ResetDisplay()
            {
             Configuration.LCD.Configurations lcdConfig = new Configuration.LCD.Configurations();

            lcdConfig.Width = 320;
            lcdConfig.Height = 240;

            // Only use if needed, see documentation.
            //lcdConfig.PriorityEnable = false;

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

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

            lcdConfig.HorizontalSyncPulseWidth = 41;
            lcdConfig.HorizontalBackPorch = 27;
            lcdConfig.HorizontalFrontPorch = 51;
            lcdConfig.VerticalSyncPulseWidth = 10;
            lcdConfig.VerticalBackPorch = 8;
            lcdConfig.VerticalFrontPorch = 16;

            lcdConfig.PixelClockRateKHz = 10;

            bool bNeedReset = Configuration.LCD.Set(lcdConfig);

            System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
            

            
        }

and after ResetDisplay I reboot my System with Microsoft.SPOT.Hardware.PowerState.RebootDevice(true);


if (SystemMetrics.ScreenHeight == 0 || SystemMetrics.ScreenWidth == 0)
            {
                ResetDisplay();
                Microsoft.SPOT.Hardware.PowerState.RebootDevice(true);
}

But the hardware reboot doesn’t work and I have to reboot extern with the reset button.
Then everything works fine.

Can anybody help me?

Thank you.

Stefan


#2

Hi Stefan,

Define “very long”? For me it’s a couple seconds for ~1MB of code. How much does it take for you?

I guess your problem is here:



The thread sleeps forever so Microsoft.SPOT.Hardware.PowerState.RebootDevice(true) is never called.

#3

@ Stefan Kraus - which board are you using?


#4

Cobra II.


#5

Hey Gus and Simon,

@ Simon.For a small Programm ( max. 1 MB ) it takes 30 minutes!
I transfer the data with MFDeploy from my board over USB.

MFDeploy -> Target -> Application Development -> Create Application Development

Oh cool. I will try it!! Thanks!

@ Gus. At the momemt I’m using the FEZ Cobra II with the G120, but this is just our test board. Later we will use a board with the G400.

Thanks!


#6

That’s obviously too much. Are you using WinUSB drivers or legacy ones?


#7

Oh yeah, I thought so!

It could be that I don’t use the WinUSB driver!

Now I’m installing the new Version of your SDK. I saw there is a new version from oktober!

Will the WinUSB driver be installed by the new SDK?


#8

No, now you’ll have to manually remove drivers from Device Manager, and then point the new ones.


#9

Okay Simon! I will try it!

Thank you!


#10

On EMX for a hex file of about 750kB it takes a second to create the file using mfdeploy over USB. It’s a bit longer when I use COM (less than ten second).
Same speed is achieve using legacy or winusb driver in my case