@ Gene
Does the green LED blink in spite of the exception?
Cuno
@ Gene
Does the green LED blink in spite of the exception?
Cuno
Iâve tried your code. It doesnât work on my Mountaineer Ethernet aswell.
Which pin is the (Cpu.Pin)75 ?
Do you want to control the Mainboard LED?
Have you tried
Mainboard.SetDebugLED(True);
Mainboard.SetDebugLED(false);
?
Can you try it without the âusing Mountaineer.Gadgeteerâ declaration, and after also removing [em]all [/em] references to Gadgeteer libraries from the Visual Studio project?
It is the green LED of the mainboardâs RGB LED.
See also âUser LEDâ in http://www.mountaineer.org/app/download/7038536775/Mainboard+Mainboard+Sockets+V20130108.png?t=1357643442
Cuno
Never mind, I was so befuddled by my other issues, the code I posted is completely wrong. Iâm working on something more reasonable now.
Whoo, hoo!!
As Cuno suggested, I took out all references and usings that had Gadgeteer in them and I can blink the LED on the Mountaineer board! The only references are .SPOT.Hardware, .SPOT.Native and mscorlib.
I attached an image of what my VS project looks like.
Below is what shows up in the Output window. Toward the bottom, there is a line that reads âThe thread ââ (0x2) has exited with code 0 (0x0).â. I never noticed this before but my program works so Iâm assuming it is a non-issue.
Many, many thanks to everyone who helped me with this issue. If youâre ever in the Monterey Bay, CA area, give me a call at the Monterey Bay Aquarium Research Institute and Iâll give you a tour. We have some pretty cool stuff going on.
Cheers - Gene
[em]Found debugger!
Create TS.
Loading start at 8045758, end 80589dc
Assembly: mscorlib (4.2.0.0) Assembly: Microsoft.SPOT.Native (4.2.0.0) Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0) Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1) Assembly: System.Xml (4.2.0.0)
Loading Deployment Assemblies.
Attaching deployed file.
Assembly: MountaineerDigitalIO (1.0.0.0) Resolving.
The debugging target runtime is loading the application assemblies and starting execution.
Ready.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dllâ, Symbols loaded.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dllâ, Symbols loaded.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dllâ, Symbols loaded.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dllâ, Symbols loaded.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dllâ, Symbols loaded.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dllâ, Symbols loaded.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Xml.dllâ, Symbols loaded.
âMicrosoft.SPOT.Debugger.CorDebug.dllâ (Managed): Loaded âC:\Users\magene\Documents\Visual Studio 2010\Projects\MountaineerDigitalIO\MountaineerDigitalIO\bin\Debug\le\MountaineerDigitalIO.exeâ, Symbols loaded.
The thread ââ (0x2) has exited with code 0 (0x0).
Starting Program âŚ
The program â[16] Micro Framework application: Managedâ has exited with code 0 (0x0).[/em]
Very interesting to see what kind of projects you are doing there!
I am working with a custom board very similar to the Mountaineer Eth, i. e., based on the same STM32F407VGT6, and am seeing an error that looks similar to the one described by the original poster.
[ul]Pulling up BOOT0, it enters DFU mode alright, and I can use the DfuSe Demonstrator tool to flash the Mountaineer 4.2 QFE2 firmware image via USB.[/ul]
[ul]Outside DFU mode though, it shows as âMountaineer ETHâ with a yellow warning sign in the Device manager, and the status is[/ul]
[ul]pulling up PE10 (= SW on Mountaineer) when starting the board, I can see PE14 (= blue LED on Mountaineer) flash, which I take as proof that TinyBooter entered upload mode. On the Windows side, the Device Manager shows the same error entry as above.[/ul]
[ul]MFDeploy does not see the device in either start mode.[/ul]
OS is Windows 7 x64, tried on two different PCs. The board has a separate power supply and draws no power from the USB VBUS pin. On the same PCs, the genuine Mountaineer board is shown without error in the Device Manager, and is seen by MFDeploy.
I would be very glad to get any hints in which direction I could look for the error source. Thanks a lot in advance!
Your issue is the driver not starting - although I donât understand why the same driver is trying to start when in tinybooter mode (but that could be expected, it wasnât my expectation though).
So I think if we can find a reason for driver not to start and can resolve that, weâll make progress. Can you do screenshots of the driver info tabs from Device Manager and attach here? I seem to remember some specific guidance from Mountaineer about driver loading - have you (found and) followed their advice?
Thanks for the reply.
See below (only a few properties displayed - which ones would be interesting?)
I guess you mean this:
http://www.mountaineer.org/app/download/6122023375/Mountaineer+Firmware+and+USB+Driver+Installation+Guide+for+NETMF+4.2+QFE2+V20120921.pdf
Which is what I did.
The only detail which I did differently than described is that I did not check âverify after downloadâ in the DfuSE tool, because this option reproducably leads to crashes of the tool. I do not think that verify is crucial, though, as the genuine Mountaineer board works nevertheless, and the blinking LED in TinyBooter shows that at least this part must have been written to flash alrightâŚ
I think you got the important ones - especially the WinUSB âserviceâ page. My only thoughts are can you do step 6 from the install PDF you linked to again (I know, you did it before⌠Iâm exceeding my knowledge here and this is about the only thing that makes sense). Then Iâd also make sure you did step 7 again⌠it says it might get confused if you donât.
I know this is probably obvious, but since you mentioned itâs a custom board, did you check your hardware? Specifically, your crystal configuration? DFU mode auto-detects your HSE crystal frequency, but if you flash the stock firmware on the device, TinyBooter and TinyCLR both expect a 12 MHz crystal.
If TinyBooter or TinyCLR hang after enumeration, it will usually instead cause a âWindows has stopped this deviceâ error.
Typically, if youâre building a custom board, you should always put accessible JTAG/SWD headers on the first revision. With an SWD interface, youâd be able to immediately see whatâs going on. Thereâs a lot of software and hardware that sit between your board and your computerâs USB interface. If anything goes wrong, it all fails.
You hit the bullâs eye. As it turns out, we have an 8 MHz crystal. I guess there is no way to change the frequency setting of TinyCLR without rebuilding it? I will try and replace the crystalâŚ
I actually have a full JTAG header which we use to program/debug with the CooCox IDE (non-netmf). That works without problems on this board, but I have not tried to debug TinyBooter or TinyCLR with it. I suspect I would have to build netmf myself for that, which is something I shied away from so farâŚ
Just did that, and bang! Problem solved.
Thanks again for the hint, jay!