Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Serial only works when plugged into USB N+2


  • Please log in to reply
3 replies to this topic

#1 rickitytick

rickitytick

    New Member

  • Members
  • Pip
  • 3 posts

Posted 28 October 2014 - 01:30 PM

I am using my N+2 to receive serial commands from a device and report back an encoder position.  It works fine when the Netduino is powered by my computer, even when Visual Studio is not running, but it won't send a complete reply when powered externally.  I am sending the position info with a start and end character, but the device only receives the first 3 bytes when powered externally. 

 

Anybody have any thoughts on how to fix this?



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 02 November 2014 - 03:53 PM

Hi rickitytick,

 

If you plug in external power while also using USB power from your PC, does the Netduino app run fine?

 

If you reset that board while Visual Studio is not running, does the  Netduino app run fine?

 

Plugging in external power should auto-switch from USB power.  The thing I'm looking for here is to find out if it's a power issue, a timing issue, etc.

 

Chris



#3 rickitytick

rickitytick

    New Member

  • Members
  • Pip
  • 3 posts

Posted 04 November 2014 - 02:12 PM

Chris,

     The app ran fine with external power and the USB cable was plugged in.  It only erred when I removed the USB cable.   I rewrote my serial code to use the SerialPortHelper Class and it seems like that solved my issue. It was most likely because I was trying to process the incoming serial commands as they were received instead of buffering them.



#4 rickitytick

rickitytick

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 November 2014 - 12:53 PM

Just for reference, I don't know if this is related to my original issue or not:  Once I started using the SerialPortHelper class, I started getting failure to allocate errors followed by system out of memory.  My program is very small and I'm not storing anything.  I went back to the original code and the errors followed.  I ended up having to uninstall and reinstall VS2010, .NETMF, and Netduino SDK and now it works fine with no errors.






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.