Strange behaviour from FEZ Domino...?


Been googling the forums and the “net” but can’t seem to find any mentioning on this so I thought
I just post it here. Sorry if this is a known/RTFM kind of “bug”…

I’ll begin with the problem:

With the latest firmware loaded, updated NETMF and VS 2010 express, whenever I connect a USB
device to my FEZ Domino board, Debug.Print() stops outputting to the Output window and VS stops
trapping my breakpoints?

The board/application is still running though, as my testcode also “communicates” via “blinkenlights” :slight_smile:
And this continues to work, so I know an event is triggered both at connect and disconnect and that
my eventhandlers are being called.

Solution: If at this point I go into VS and choose “Debug->Break All”, that still works! I break somewhere in my code.
If I now choose: Continue (F5), Debug.Print() and breakpoints starts to work again as intended…

I was wondering if anyone else noticed this behaviour? I am relativly new to my “board”, but I am
pretty sure this used to work without a hitch before…

I have run USB Host related examples from the Tutorials just to make sure, but they too give me
the results described above…

If requested, I’ll post my testcode, but I’ll wait in case this is an “easy fix”/config-mistake on my

Best Regards!

Welcome to the forums.

Never heard anyone else report a scenario like that, so I suspect that it’s something local to you. Not saying it’s not a bug or a problem, just that it seems, well, unusually specific to you :slight_smile:

Post a good, simple example and I’ll run it on my Domino when I get home.

I have a feeling this is related to not having good power source.

Yeah, it does seem really weird.

Just made sure everything is updated and all, and then I ran this new piece of code:

       public static void Main()
            OutputPort LED;
            Debug.Print("Starting up!");

            bool blink = true;

            LED = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, false);

            Debug.Print("Entering loop");

            while (true)
                Debug.Print("Blink: " + blink.ToString());
                blink = !blink;


There is no other code than the one stated here…!

In the output window , I get
’Blink: true’
‘Blink: false’
‘Blink: true’

Repeated forever, until I connect a USB keyboard to the board.
At that point, the output window stops outputting …
I can still however do “Debug->Break All”, then F5 to continue and the output starts up again…

When I unplug the keyboard however, there is no interruption in the output.

I’m running “nativly” on a Win 7 home 64bit, fully updated.
The card is only plugged in to the computer and doesn’t have an external power supply.
I will have to find some aux. powersource to test if that will make any change in behaviour.

However, this is perfectly reproducible for me, and it works the same every time, which would count
against it being to low power (I tested other types of USB devices and the result is the same).

I will try with an external powersource and report back though…

I just noticed turning on the sound on my computer, that when I plugg in the keyboard into the domino
board, the Computer(!) gives the typical sound of a USBdevice being disconnected and then connected.
Is that “normal”?
Is it the Domino board disconnecting and immediatelly connecting?
I would wager that would explain why Visual Studio “looses” its “link” to the debugging session…

Best regards!

OK, so I can somewhat repro this.

Try this code snippet instead.

           int i = 0;
            while (i < 200)
                // Sleep for 500 milliseconds

                // toggle LED state
                ledState = !ledState;
            while (true)
                // Sleep for 500 milliseconds

                // toggle LED state
                ledState = !ledState;

This gives you a rapidly flashing LED for ~20sec after startup, then back to a slower flashing one. Wait for the first phase to go, and you get “loop2” messages, then connect your USB keyboard.

For me, this all continued to work as expected after attaching a USB keyboard or a USB thumbdrive (4Gb sandisk cruzer micro). When I connected a 8Gb Sandisk Cruzer USB thumbdrive though, it rebooted and my app restarted.

So it’s definetely power related. You are increasing the current draw required from the USB power to cause the voltage to drop sufficiently to reset the uC.