Netduino home hardware projects downloads community

Jump to content


Photo

my Netduino 2 is stuck in BootLoader mode and its driver will not respond


  • Please log in to reply
15 replies to this topic

#1 rplant

rplant

    New Member

  • Members
  • Pip
  • 1 posts

Posted 22 March 2014 - 02:49 PM

hi, i cant seem to work my netduino 2 due to a driver malfunction, if it matters i am running it on a windows 7 operating system and it has version 4.2. when i plug it in, i have to hold the onboard_BTN or it will not show up

in my control panel, this problem started while debugging a program that uses pins 5V,GND,D13,D12,D11,A0,A1 and A2. the blue onboard_LED is permanently on, and i do not use it in my program, even when my netduino is in bootloader mode, when running my program it gives me the message "Error 1 Device not found or cannot be opened - USB:Netduino". if you understand the problem, please write back :)

 

 

 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 March 2014 - 03:50 PM

Hi rplant,

Grab a copy of "Netduino Update" from the "Netduino 2 v4.3.1 firmware thread". Then use Netduino Update to erase your current app.

Netduino Update app:
http://forums.netdui...-firmware-v431/

Instructions:
http://forums.netdui...te-application/

Does that get you up and running?

Chris

#3 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 26 March 2014 - 09:21 AM

Hi,

 

i have the same problem more often than I would like to.

I'm currently trying to get my N2(+) devices running, and found out, that the N2-series is much more fragile when it comes to handling data (currently only evaluated the serialport).

When the driver does not respond, in 99% it's a "Buffer overflow" message.

 

How to identify?

  • You try to deploy new assemblies via Visual Studio and the debugger does not attach
  • After deploying new assemblies, the device restarts on it's own every few seconds
  • Messages like "Device not found" or similar shown when trying to deploy new assemblies
  • Detach any debugger and open the "MFDeploy" tool from the Micro Framework SDK. Select "USB" and after connecting the USB cable press the "Ping" button a few times. The "buffer overflow" messages or any Debug.Print output can be seen there.

 

How to solve?

  1. If VS shows message that it's waiting for the device to reboot, after deployment was successfull. Just unplug and replugin the USB cable, in most cases the debugger automatically attaches.
  2. If even deployment is not possible with messages like "Device not found" or similar. Following sequence works for me in most cases. Unplug USB cable. Rebuild in VS (F6). Clean Solution. Start deployment with debugging (F5), without the device attached. Now the console in VS should show something like "Iteration 1, Iteration 2...", now plugin the USB cable again. This should at least make it successfull to deploy the new assemblies. If the debugger then does not attach, try step 1.)
  3. If step 1.) and 2.) do not work try to erase the app via the "Netduino Update Tool", in 50% of the cases this helps, if not for me the only solution was redeploy the firmware.

 

Altogether I'm not really happy with the new N2(+) series, by only introducing a Thread.Sleep(100) after reading the buffer on a SerialPort I got the buffer overflow problem again, while on the N1(+) series it works without any problem for month. Also working with the DataReceived event on the SerialPort causes a "buffer overflow" working with the same code in a simple while() did not make any problem.



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 March 2014 - 09:31 AM

nhale,

Netduino 2 is faster so, ironically, code runs faster and buffer overflows could occur more easily.

This is one area in NETMF where it might be better to discard the overflow data (gracefully degrade) rather than shut you out. Would you like to file a bug report on netmf.codeplex.com, and I'll be sure to discuss it with the NETMF team? If there are no obvious side-effects, we could tweak the core NETMF runtime to suppress that shorter-term as well.

Thank you very much for your feedback on this. We want both NETMF and Netduino to be awesome platforms for you--and this really helps us identify and smooth out the rough spots.

Chris

#5 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 26 March 2014 - 11:37 AM

Hi Chris,

 

sure the N2 is faster but from my point of view there must be another problem. Imagine the following:

- GPS sensor sends data with 115200 baud and 10Hz updates (Adafruit Ultimate GPS v3), so the amount of data is always the same regardeless of N1 or N2.

- N1 which is slower, so cannot read the data so fast --> I would expect the buffer overflow, but works fine.

- N2 which is faster, so can read the data faster, to make memory free for new incoming data throws a buffer overflow...

=> Again the source of the data behaves the same. The code is the same, just the Netduino is different.

 

 

If you want that I file a bug, I can do this - but is discarding really the solution?

What I'm missing is some kind of advice how things should be done - I tried several implementations of reading data from the serial port here from the forum and none of them is by default stable, all of them ran into the same problem after seconds or less than 5 minutes ;-( (and buffer or allocation problems only occured on N2)

 

If really discarding the data is the only way, than I think it would be somehow helpful to throw an exception which can be caught via code once a buffer overflow was detected, that you at least know what happened. Because currently it's just a lot of effort to find out what happened and get a fixed version again on the device (see my last post)



#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 March 2014 - 07:54 AM

Hi nhale,

So this is on incoming data only? Are there any other threads running? If you just create a simple program with a DataReceived event and you pull in all the data there...does that keep up?

If you're just capturing data, Netduino 2 should perform as fast or better than Netduino 1.

Also...are you by any chance doing a lot of Debug.Print calls in your application? If you've installed the 4.3 SDKs, the NETMF SDK on the PC slows things down a bit more when dealing with older versions of NETMF due to the new timings instituted for 4.3.

Chris

#7 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 03 April 2014 - 09:05 AM

Hi Chris,

sorry for the late reply.

Installed:
- Windows 7 with NETMF 4.3 (QFE1) and Netduino SDK 4.3, I deinstalled the older versions before
- VS2012 Premium (VS2013 Premium installed but not used for Netduino development - if this info is relevant)

When I make a simple program without any Threads and just reading the data from the Serial Port even then I get errors.

I attached a small solution which does nothing else then configuring the Hertz and Baudrate for the GPS receiver and then starts waiting for data.

In the "Main" there are two options when calling the Start-method. One works using a while loop and one using the DataReceived Event.

The while loop works better but even there I get the following (can be seen when doing a Ping with MFDeploy)
Both occur multiple times
- Failed allocation for 5 blocks, 60 bytes
- Buffer OVFLW

When running with the DataReceived event MFDeploy shows only
- Buffer OVFLW

The Thread.Sleep at the beginning of the main is used to be able to redeploy stuff, because as soon as the Buffer OVFLW happens
it's a problem.

The implementation for the N1(+) does a lot more than just reading the data from the serial port, is using threads and works fine.
My question is the following, how can I prevent these errors? Is there anything I can do in the coding to detect that it might happen sooner or later or to clear something to get rid of it?

Thanks

 

 

 

Attached Files



#8 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 03 April 2014 - 07:41 PM

I opened an issue for the problem.

https://netmf.codepl...m/workitem/2226



#9 Prashant4U

Prashant4U

    New Member

  • Members
  • Pip
  • 3 posts

Posted 14 April 2014 - 07:00 PM

Hi,I have purchased a netduino plus 2 lately and i was going through 'Getting started wth netduino excercises'.Something weird has happend to my netduino.Its not powering up.The power led and the blue led comes on and goes off. VS2012 aslo showing device not found.Have i damaged my netduino,worried,Please help.



#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 April 2014 - 07:57 PM

Hi Prashant4U,

What does your Netduino show up as in Device Manager?

Chris

#11 Prashant4U

Prashant4U

    New Member

  • Members
  • Pip
  • 3 posts

Posted 15 April 2014 - 02:55 AM

Hi Chris,

 

It shows up as 'Netduino' but it goes off.The power led also goes off.

Now i have noticed a new thing,the board is also getting hot.

 

 

Prashant



#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 16 April 2014 - 03:37 PM

Hi Prashant,

If the board powers up but then dies quickly, there may be a bad electrical connection somewhere--or your board has gotten damaged somehow.

Is there anything plugged into your board? What components were plugged into the board when it started to fail?

Chris

#13 Prashant4U

Prashant4U

    New Member

  • Members
  • Pip
  • 3 posts

Posted 16 April 2014 - 05:50 PM

Hi Chris,

 

Yes ,the netduino is behaving the same way as you said and nothing is connected to my netduino when it does that.

I usually power my netduino through USB with my laptop.

I was trying the following example: http://wiki.netduino...itor-Motor.ashx

Only difference was that, I was using 12v DC Motor and 9v Battery.

I did had 5Kohm resister in between Pin9  and base of transistor.

I have purchased my netduino 2 weeks ago. If my netduino is damaged will it be in warranty period or can I repair it from somewhere.

 

Prashant



#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 16 April 2014 - 06:56 PM

Prashant4U--you have PM.

#15 vad710

vad710

    New Member

  • Members
  • Pip
  • 2 posts

Posted 22 July 2015 - 04:21 AM

Was there ever a solution to this?



#16 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 July 2015 - 04:23 AM

Hey vad710,

Was there ever a solution to this?

Are you experiencing a similar issue? In most circumstances this is an issue fixed by erasing and reflashing the Netduino. [Unless it's an issue related to damaged/bad hardware...]

Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.