Main Site Documentation

"An error has occurred: please check your hardware"


#1

I’m getting this out of the blue with a simple project that has been working fine,

I erased the app with MFDeploy, still refuses to deploy inn VS.

Opened another solution and built/deployed fine - its just this specific VS solution that refuses to deploy.

Sadly this “toy” project wasn’t under GIT else I might be able to see what files had changed in any way…

I read this but its of no avail: http://forums.netduino.com/index.php?/topic/223-an-error-has-occurred-please-check-your-hardware/

Any ideas folks?

Korp.

PS, I did briefly run the app under the emulator, that crashed so I switched back - this is when it began to fail…


#2

Hmm - Release build deployed fine, just Debug build.,…


#3

Fixed.

Some combination of things, I deleted the [em].csproj.user[/em] file, had no effect, restarted VS it then worked (I had restarted VS a few times already).

I’d also deleted two files (probably related to emulator) OnBoardFlash.dat and OnBoardFlash.dat.smd - I dont recall seeing those in the solition folder tree until running emulator, anyway if I’d restarted VS after deleting these it may have worked - unsure of exact cause but its definitely in this area!


#4

@ KorporalKernel - hey, I know its already fixed for you, i just wanted to add some more information in case someone from GHI whats to take a look, i have this issue all the time, like 1 every 4 times i program a cerberus board (i use several different ones all of them updated), but for me, it normally is solved if i Unplug the device… let it stay off for couple of minutes, and then plug it again and immediatelly i run the debugger again.

not wure why, not sure how to avoid it but it happens.


#5

If the project had been in a local GIT repo I could readily see [em]exactly [/em]what files differed or came into existence between the problem not happening and the problem happening. Also if I’d had it under GIT I could simply revert to an earlier commit and see if that works, this is a very good way to track down the root cause, but I didn’t bother making it a repo because it was a “throwaway” project.

My suspicion is that it’s not the device itself but something odd with VS or how it deploys…

Maybee I’ll do this and attempt to recreate the failure…


#6

@ Ingcuervo - I will also add that on about 3 of my custom G400 boards so far, when I plug the board into the USB port of my PC, I will occasionally get a “USB Device Not Recognized” error instead of the usual “NETMF Debug Interface” identifier in Device Manager. If the board gets into this state, resetting the board doesn’t fix the situation, and neither does unplugging the USB and plugging it back in (when done quickly).

The only way I’ve found to reliably get the board to be recognized is by unplugging the USB, then leave the board unpowered for about 5 to 10 seconds, and plug it back into the USB port. It is only recognized after this unpowered state has been sustained for at least that amount of time.

I think there’s some sort of clock/timing hardware issue on some of the boards, possibly related to an issue with the G400 that I reported earlier where the G400’s first power-up occasionally makes its processor clock run 10X slower than normal.

Regarding “An error has occurred: please check your hardware” message, I get this a lot when I plug the G400 into a USB 3.0 port. I generally don’t get this when using a USB 2.0 port, which is now my preferred port for deployment.


#7

I am getting this error on a G30 dev board and powering off the device does not solve it.Was attempting to deploy my code in debug mode (VS 2013) on a Windows 7 PC. Any advice? I tried all front and back ports on the PC.


#8

what do you see under device manger?
Can you start a new empty project and try to upload?
Restart VS or even the PC, just in case.


#9

In device manager I see the G30 in usb devices. I will try restarting everything as well.

Am I supposed to call Display.Populate at all? I saw it in an example but am not sure if that is required for bitmap flushing. Also what assembly references do I need?I am pretty sure I don’t need all of these but am not sure which. I have:

using GHI.Pins;
using GHI.Processor;
using GHI.Utilities;
using GHI.Usb;
using Microsoft.SPOT;
using Microsoft.SPOT.Native;
using Microsoft.SPOT.TinyCore;
using Microsoft.SPOT.IO;
using Microsoft.SPOT.Graphics;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Presentation.Media;
using System.Threading;
using System;


#10

After resetting everything I am able to initialize the debugging session but am getting unhandled exceptions trying to write to the display. I started with Display.Turnon() before creating a bitmap and get no response.


#11

Looks like you have been asking questions to us directly and though the forum. Let us focus on the forum so we can help you better.

Please start by blinking an LED on the dev board. The LEDs are labeled with pin numbers. Once that is working, then we can be sure you have a working system, then we can look into the display.


#12

Can you please explain to me the difference between turning on the display with OutputPort(Cpu.GPIO_Pin7,true) and Display.Turnon()? The below blinks the LED and display but I am unable to turn the display on with Display.Turnon(). I think my understanding of the OutputPort class and Display class may be flawed. Also what is the difference between PC7 and Pin 7? I am new to microcontrollers but am pretty solid with C#.

I implemented this basic example:

public static void Main()
    {
       OutputPort LED;
       OutputPort disp;
        disp= new OutputPort(Cpu.Pin.GPIO_Pin7, true);
        LED = new OutputPort(Cpu.Pin.PC7, true);
        Thread.Sleep(200);
    }

#13

Like I explained before, there is no “display” or graphics on G30 at all. You need G120 for that. G30 however can control pins and busses, like SPI bus. Those can be used to control a simple display. And that is what is being used on the dev board and brainpad.

The pin that turns the display on, is simply controlling the backlight LED on the display. Drawing on the display is all SPI bus transactions. There is no “display” code anywhere in the brainpad code.

There is no fonts, no bitmaps, no draing, no glide…nothing graphical on G30. You can implement all that in your won code as needed. You can see all that in the brainpad code DrawCircle, DrawText…Draw…

If you need real graphics support, you need G120, where all graphical services are built in.


#14

@ Gus - Yes I understand there are no built in graphics options. All I want to do is take the display class from the BrainPad file and use the DrawText() method to write a string through the SPI port. How do I accomplish this?


#15

Did you modify the pins from what the brainpad uses to the ones listed on the dev board by the display?

Does the display backlight come on? Do you get any exceptions?

I am confused because this thread is about you having issue deploying, so I am not exactly sure where you are at and how I can help.


#16

I’d suggest starting your own thread too, for a specific problem, just so we don’t chase red herrings based on subject lines…


#17

@ Gus -I was unable to figure out how to create a new post hence why I piggy backed on this one with my various questions.

I have made progress since my previous posts. I am able to turn the screen back light on and off with a button press as well as control the LED but am not sure how to display simple text to the screen with the code from the brain pad display class. I have not changed any pin numbers.


#18

Before we proceed, are you using NETMF because this is for a project that needs to be completed in the near future? Since TinyCLR is the future, just making sure.


#19

Yes I am using NETMF because I am creating a product that will be going into production hopefully within a month or two. The only bottle neck I can foresee is the G30 chip being out of stock. My supervisors want me finishing this as fast as possible. What I need to do is program a G30 to take input from a hall effect sensor and control a DC stepper motor (capable of 0.1 degree steps) based on the hall effect sensors input. The g30 must also interface with a display (I have not picked a display yet and was wondering if I can purchase hundreds of the display used in the dev board or another display that is already GHI configured for speed - let me know what the best option would be for a cheap reliable display - it just needs to be capable of displaying simple text, eventually we would like to add a touchscreen to reduce number of switches needed). The motor also needs to be controlled by a rocker switch. A calibration mode and switch will also be present.

Any design considerations and advice will be greatly appreciated. We are going to be permanent customers since I have chosen the G30 as the MC for our device.


#20

@ hwalker_MIWV - ok sounds great.

go here https://www.ghielectronics.com/community/forum/board?id=34 and you should see “start a new topic” button at the top of the page. Please start a new topic with your question.

Please note that business questions, like availability and display options are best to be discussed directly with us. The forum is easier for support questions. And we should anyway talk about your project soon, after you are more familiar with G30.