Main Site Documentation

Display T35 Blocks Event Dispatcher


#1

Hello guys,
i’ve noticed after adding a Display T35 via Spider Designer, my SD Card and USB event no longer fire upon boot…
these events:


                usbHost.USBDriveConnected += (UsbHostUsbDriveConnected);
                usbHost.USBDriveDisconnected += (UsbHostUsbDriveDisconnected);
                sdCard.SDCardMounted += SdCardSdCardMounted;
                sdCard.SDCardUnmounted += SdCardSdCardUnmounted;


removing the Display from the designer causes them to fire and work as they should.

i’ve also noticed if i move the
display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10); from the generated code to the ProgramStated() after the addition of my other events, they fire just fine…:


               usbHost.USBDriveConnected += (UsbHostUsbDriveConnected);
                usbHost.USBDriveDisconnected += (UsbHostUsbDriveDisconnected);
                sdCard.SDCardMounted += SdCardSdCardMounted;
                sdCard.SDCardUnmounted += SdCardSdCardUnmounted;

		display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);

Which tells me we may have a bug in the Display Driver causing things to stall…

Please let me know if you can Duplicate the issue.

Jay.


#2

i also noticed that if i rearrange the InitializeModules() to where the Display is the first one to be initialized causes the events to fire upon boot:


//original code
        private void InitializeModules()
        {            
            // Initialize GTM.Modules and event handlers here.	
            usbHost = new GTM.GHIElectronics.UsbHost(3);
            sdCard = new GTM.GHIElectronics.SDCard(5);

            display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);

        }

and this one below works:


//Modified Code
        private void InitializeModules()
        {            
            // Initialize GTM.Modules and event handlers here.	
            display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);

            usbHost = new GTM.GHIElectronics.UsbHost(3);
            sdCard = new GTM.GHIElectronics.SDCard(5);
        }

unfortunately that is not a solution since that files gets generated automatically.
maybe GHI can check it out and let us know.

thanks.


#3

We will test that but can you please give us exact simple steps we need to follow to repro?


#4

it’s very simple add the sd Card, USB Host, and TF35 Display, modules using the designer and create the sdCard and USBHost event listeners the usual way in the program started… and notice how the events don’t fire upon boot, now if you completely remove the display from the designer they will fire… next to try and shift the code in the Program.generated.cs as shown above and they will fire…

any questions please let me know…

Ah and before you ask:

Spider firmware: 4.1.8.0
boot loader: 4.1.6.0

thanks.


#5

In our tests, following your steps,

the events fired properly. Are you doing this in a blank project? Do you have any more steps that we can try?


#6

Yes this is a blank project…

ah i forgot to mention that it works on Stand alone, meaning USB or Power Adapter … but it doesn’t fire when you DEBUG…

So if you hit Debug in VS your events won’t fire… but if you hit reset and the board restarts the events fire up as they should…
i used this in the SDCard Mount to see it fire when i’m not debugging.


        Debug.Print("Mounted");
            for (int i = 0; i < 100; i++)
            {
                PulseDebugLED();
                Thread.Sleep(50);
            }            

So please try it with the debug and let us know…

thanks.


#7

This was tested while debugging using Visual Studio.


#8

Not here,
i uninstalled all SDK’s and reinstall them without any effect on the current issue…
i also noticed another rather weird thing.
if i leave my USB plugged in and plug my 12V 4A Adapter the screen goes white and the USB gets unloaded from windows. it makes the ding sound that the usb got unplugged… and sure enough VS2010 doesn’t detect it…

while this same adapter and same USB cable and port worked fine together yesterday…

What does this mean???


#9

This is normal.