G400D Beta Kit Strange Behavior when no Display attached

I have a noticed peculiar issue with the G400D Beta Kit and latest firmware. If i attach a button to Socket 1 (no display attached) and Debug the application, VS 2010 Output window states:

Updating display configuration. DEVICE WILL NOW REBOOT. Visual Studio might lose connection, and debugging might need to be manually restarted.

Once the device is rebooted, it is no longer accessible from the VS or the PC in the Device Manager.

The only way to recover the G400 is to use the G400 Beta Programmer and then reload the firmware.

This does not happen when the button is attached to Socket 9 and is reproducible. No other sockets have been tested because I go tired of re-initializing the G400.

Also, I am using taylorza’s G400HDR Mainboard Driver if that makes a difference.

Thoughts anyone? Firmware bug?

As I am still new to Gadgeteering, I neglected to set the HeadlessConfig to Null and update the configuration.

Mainly, because, I didn’t know that I should and secondly, I do not know how. Sample code would be appreciated.

Besides, I still do not understand why failing to do so would corrupt the TinyBooter and firmware to the point that I have to reprogram the entire board starting with the BetaProgrammer.

It does not do this with my Spider Mainboard.

the mainboard definition and support for the G400HDR is community driven, not an official GHI offering. That’s why things are not the same nor potentially as well documented or as complete. So unlikely that anything here is a firmware issue.

@ scardinale - I am surprised that this trashes the firmware so badly, I tested it on my side and I have the same results. I cannot see anything obvious as to why not using a headless configuration would corrupt the firmware, I will take a deeper look into this tonight.

We will investigate

Probably flashing config.hex will fix the problem. Mhh seems that something is bugged on config area

@ dobova. Can’t re-flash just the config.hex as it also corrupts the tinybooter area as well. After the corruption, the device is not recognized and will not boot. The only way to recover is to program the G400 with the beta programmer and then re-flash with FezConfig.

@ scardinale - Ok, have you tried to press reset button while pressing the two other buttons on G400HDR ? This will put the board in tinybooter mode. If the board is in tinybooter mode the PC will see G400 as a correct USB device. Otherwise I think no hope …
An attached display can help in this case. If it is hard crashed, yes, you need sam-ba programmer.
I’ve tried LCD settings to null and have same problem, but no corruption of the tinybooter.

@ Gus - I have checked the mainboard driver and I cannot see anything obvious that would cause this from the managed code. Has your team been able to identify anything that might be a potential problem?

It is a firmware bug

@ Gus - Thanks for the update. I am glad you were able to find the issue, I was frantically trying to find what I might have missed.